summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimeon Simeonov2023-01-12 22:36:04 +0100
committerSimeon Simeonov2023-01-12 22:36:04 +0100
commite62d7c5ea3bc014123cf6f78e5345c588cd4f068 (patch)
tree17ea5bbbe613a320f4ce91dd019e497a8bd90565
parentdc1baaa1b1079516a7e2aead21f9af847e64494d (diff)
Make the project PEP517 compatible
-rw-r--r--Makefile6
-rw-r--r--README.md2
-rw-r--r--pyproject.toml7
-rw-r--r--setup.cfg41
-rw-r--r--setup.py47
-rw-r--r--src/ngus/__init__.py (renamed from ngus/__init__.py)6
-rw-r--r--src/ngus/__main__.py (renamed from ngus/__main__.py)4
7 files changed, 60 insertions, 53 deletions
diff --git a/Makefile b/Makefile
index 852f221..e9fb990 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
1package: COPYING ngus/__init__.py ngus/__main__.py LICENSE README.md setup.py 1package: COPYING src/ngus/__init__.py src/ngus/__main__.py LICENSE README.md setup.py pyproject.toml setup.cfg
2 python setup.py sdist bdist_wheel 2 python -m build
3 3
4upload: dist/* 4upload: dist/*
5 python -m twine upload dist/* 5 python -m twine upload dist/*
@@ -8,4 +8,4 @@ upload-test: dist/*
8 python -m twine upload --repository testpypi dist/* 8 python -m twine upload --repository testpypi dist/*
9 9
10clean: 10clean:
11 rm -rf build dist ngus/__pycache__ ngus.egg-info 11 rm -rf dist src/ngus/__pycache__ src/ngus.egg-info
diff --git a/README.md b/README.md
index 67689ad..670720a 100644
--- a/README.md
+++ b/README.md
@@ -163,7 +163,7 @@ Simeon Simeonov - sgs @ LiberaChat
163 163
164## [License](https://github.com/blackm0re/ngus/blob/master/LICENSE) 164## [License](https://github.com/blackm0re/ngus/blob/master/LICENSE)
165 165
166Copyright (c) 2021, Simeon Simeonov 166Copyright (c) 2021-2023 Simeon Simeonov
167All rights reserved. 167All rights reserved.
168 168
169[Licensed](https://github.com/blackm0re/ngus/blob/master/LICENSE) under the 169[Licensed](https://github.com/blackm0re/ngus/blob/master/LICENSE) under the
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..73c35b2
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,7 @@
1[build-system]
2requires = [
3 "setuptools>=51",
4 "wheel"
5]
6
7build-backend = "setuptools.build_meta"
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..795c715
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,41 @@
1[metadata]
2name = ngus
3version = attr: ngus.__version__
4author = attr: ngus.__author__
5author_email = sgs@pichove.org
6description = A simple HTTP server for handleing file uploads
7long_description = file: README.md
8long_description_content_type = text/markdown
9url = https://github.com/blackm0re/ngus
10
11classifiers =
12 Development Status :: 5 - Production/Stable
13 Intended Audience :: End Users/Desktop
14 License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
15 Programming Language :: Python :: 3
16 Programming Language :: Python :: 3.7
17 Programming Language :: Python :: 3.8
18 Programming Language :: Python :: 3.9
19 Programming Language :: Python :: 3.10
20 Programming Language :: Python :: 3.11
21 Programming Language :: Python :: 3.12
22 Programming Language :: Python :: Implementation
23 Operating System :: OS Independent
24 Topic :: Internet :: WWW/HTTP :: HTTP Servers
25
26project_urls =
27 Bug Tracker = https://github.com/blackm0re/ngus/issues
28 Source = https://github.com/blackm0re/ngus
29
30[options]
31package_dir =
32 = src
33packages = find:
34python_requires = >=3.7
35
36[options.packages.find]
37where = src
38
39[options.entry_points]
40console_scripts =
41 ngus = ngus.__main__:main
diff --git a/setup.py b/setup.py
index fbdefcb..a5d21d8 100644
--- a/setup.py
+++ b/setup.py
@@ -1,46 +1,5 @@
1import setuptools 1# Legacy setup for some build / install systems
2 2
3import ngus 3from setuptools import setup
4 4
5with open('README.md', 'r') as fh: 5setup()
6 long_description = fh.read()
7
8
9setuptools.setup(
10 name='ngus',
11 version=ngus.__version__,
12 author=ngus.__author__,
13 author_email='sgs@pichove.org',
14 description='A simple HTTP server for handleing file uploads',
15 long_description=long_description,
16 long_description_content_type='text/markdown',
17 url='https://github.com/blackm0re/ngus',
18 packages=setuptools.find_packages(),
19 exclude_package_data={'': ['.gitignore']},
20 entry_points={
21 'console_scripts': [
22 'ngus=ngus.__main__:main',
23 ],
24 },
25 classifiers=[
26 'Development Status :: 5 - Production/Stable',
27 'Intended Audience :: End Users/Desktop',
28 ('License :: OSI Approved :: GNU General Public License v3 or later '
29 '(GPLv3+)'),
30 'Programming Language :: Python :: 3 :: Only',
31 'Programming Language :: Python :: 3.6',
32 'Programming Language :: Python :: 3.7',
33 'Programming Language :: Python :: 3.8',
34 'Programming Language :: Python :: 3.9',
35 'Programming Language :: Python :: 3.10',
36 'Programming Language :: Python :: Implementation',
37 'Operating System :: OS Independent',
38 'Topic :: Internet :: WWW/HTTP :: HTTP Servers'
39 ],
40 keywords='upload http httpd',
41 project_urls={
42 'Bug Reports': 'https://github.com/blackm0re/ngus/issues',
43 'Source': 'https://github.com/blackm0re/ngus'
44 },
45 python_requires='>=3.6',
46)
diff --git a/ngus/__init__.py b/src/ngus/__init__.py
index 2b2be7d..d085fc1 100644
--- a/ngus/__init__.py
+++ b/src/ngus/__init__.py
@@ -1,5 +1,5 @@
1# ngus v1.0 1# ngus
2# Copyright (C) 2021 Simeon Simeonov 2# Copyright (C) 2021-2023 Simeon Simeonov
3 3
4# This program is free software: you can redistribute it and/or modify 4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ import http.server
19import pathlib 19import pathlib
20 20
21__author__ = 'Simeon Simeonov' 21__author__ = 'Simeon Simeonov'
22__version__ = '1.0' 22__version__ = '2.0'
23__license__ = 'GPL3' 23__license__ = 'GPL3'
24 24
25DEFAULT_UPLOAD_PAGE = bytes('''<!DOCTYPE html> 25DEFAULT_UPLOAD_PAGE = bytes('''<!DOCTYPE html>
diff --git a/ngus/__main__.py b/src/ngus/__main__.py
index 3d09dbf..efa2c4a 100644
--- a/ngus/__main__.py
+++ b/src/ngus/__main__.py
@@ -1,5 +1,5 @@
1# ngus v1.0 1# ngus
2# Copyright (C) 2021 Simeon Simeonov 2# Copyright (C) 2021-2023 Simeon Simeonov
3 3
4# This program is free software: you can redistribute it and/or modify 4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by