... | ... |
@@ -43,6 +43,7 @@ setup( |
43 | 43 |
"Programming Language :: Python :: 3.5", |
44 | 44 |
"Programming Language :: Python :: 3.6", |
45 | 45 |
"Programming Language :: Python :: 3.7", |
46 |
+ "Programming Language :: Python :: 3.8", |
|
46 | 47 |
"Operating System :: POSIX :: Linux", |
47 | 48 |
"Operating System :: MacOS :: MacOS X", |
48 | 49 |
"Operating System :: Microsoft :: Windows", |
... | ... |
@@ -4,7 +4,7 @@ from setuptools import setup, find_packages |
4 | 4 |
import sys |
5 | 5 |
|
6 | 6 |
if sys.version_info < (3, 5): |
7 |
- print('Miniver needs at least Python 3.5.') |
|
7 |
+ print("Miniver needs at least Python 3.5.") |
|
8 | 8 |
sys.exit(1) |
9 | 9 |
|
10 | 10 |
|
... | ... |
@@ -12,42 +12,42 @@ if sys.version_info < (3, 5): |
12 | 12 |
def get_version_and_cmdclass(package_name): |
13 | 13 |
import os |
14 | 14 |
from importlib.util import module_from_spec, spec_from_file_location |
15 |
- spec = spec_from_file_location('version', |
|
16 |
- os.path.join(package_name, '_version.py')) |
|
15 |
+ |
|
16 |
+ spec = spec_from_file_location("version", os.path.join(package_name, "_version.py")) |
|
17 | 17 |
module = module_from_spec(spec) |
18 | 18 |
spec.loader.exec_module(module) |
19 | 19 |
return module.__version__, module.cmdclass |
20 | 20 |
|
21 | 21 |
|
22 |
-version, cmdclass = get_version_and_cmdclass('miniver') |
|
22 |
+version, cmdclass = get_version_and_cmdclass("miniver") |
|
23 | 23 |
|
24 |
-with open('README.md') as readme_file: |
|
24 |
+with open("README.md") as readme_file: |
|
25 | 25 |
long_description = readme_file.read() |
26 | 26 |
|
27 | 27 |
setup( |
28 |
- name='miniver', |
|
29 |
- description='minimal versioning tool', |
|
28 |
+ name="miniver", |
|
29 |
+ description="minimal versioning tool", |
|
30 | 30 |
long_description=long_description, |
31 |
- long_description_content_type='text/markdown', |
|
31 |
+ long_description_content_type="text/markdown", |
|
32 | 32 |
version=version, |
33 |
- url='https://github.com/jbweston/miniver', |
|
34 |
- author='Joseph Weston and Christoph Groth', |
|
35 |
- author_email='joseph@weston.cloud', |
|
36 |
- license='CC0', |
|
33 |
+ url="https://github.com/jbweston/miniver", |
|
34 |
+ author="Joseph Weston and Christoph Groth", |
|
35 |
+ author_email="joseph@weston.cloud", |
|
36 |
+ license="CC0", |
|
37 | 37 |
classifiers=[ |
38 |
- 'Development Status :: 4 - Beta', |
|
39 |
- 'License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication', |
|
40 |
- 'Topic :: Software Development :: Version Control :: Git', |
|
41 |
- 'Intended Audience :: Developers', |
|
42 |
- 'Programming Language :: Python :: 3 :: Only', |
|
43 |
- 'Programming Language :: Python :: 3.5', |
|
44 |
- 'Programming Language :: Python :: 3.6', |
|
45 |
- 'Programming Language :: Python :: 3.7', |
|
46 |
- 'Operating System :: POSIX :: Linux', |
|
47 |
- 'Operating System :: MacOS :: MacOS X', |
|
48 |
- 'Operating System :: Microsoft :: Windows', |
|
38 |
+ "Development Status :: 4 - Beta", |
|
39 |
+ "License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", |
|
40 |
+ "Topic :: Software Development :: Version Control :: Git", |
|
41 |
+ "Intended Audience :: Developers", |
|
42 |
+ "Programming Language :: Python :: 3 :: Only", |
|
43 |
+ "Programming Language :: Python :: 3.5", |
|
44 |
+ "Programming Language :: Python :: 3.6", |
|
45 |
+ "Programming Language :: Python :: 3.7", |
|
46 |
+ "Operating System :: POSIX :: Linux", |
|
47 |
+ "Operating System :: MacOS :: MacOS X", |
|
48 |
+ "Operating System :: Microsoft :: Windows", |
|
49 | 49 |
], |
50 |
- packages=find_packages('.'), |
|
50 |
+ packages=find_packages("."), |
|
51 | 51 |
cmdclass=cmdclass, |
52 |
- scripts=['bin/miniver'] |
|
52 |
+ scripts=["bin/miniver"], |
|
53 | 53 |
) |
... | ... |
@@ -40,6 +40,12 @@ setup( |
40 | 40 |
'Topic :: Software Development :: Version Control :: Git', |
41 | 41 |
'Intended Audience :: Developers', |
42 | 42 |
'Programming Language :: Python :: 3 :: Only', |
43 |
+ 'Programming Language :: Python :: 3.5', |
|
44 |
+ 'Programming Language :: Python :: 3.6', |
|
45 |
+ 'Programming Language :: Python :: 3.7', |
|
46 |
+ 'Operating System :: POSIX :: Linux', |
|
47 |
+ 'Operating System :: MacOS :: MacOS X', |
|
48 |
+ 'Operating System :: Microsoft :: Windows', |
|
43 | 49 |
], |
44 | 50 |
packages=find_packages('.'), |
45 | 51 |
cmdclass=cmdclass, |
... | ... |
@@ -20,10 +20,14 @@ def get_version_and_cmdclass(package_name): |
20 | 20 |
|
21 | 21 |
version, cmdclass = get_version_and_cmdclass('miniver') |
22 | 22 |
|
23 |
+with open('README.md') as readme_file: |
|
24 |
+ long_description = readme_file.read() |
|
23 | 25 |
|
24 | 26 |
setup( |
25 | 27 |
name='miniver', |
26 | 28 |
description='minimal versioning tool', |
29 |
+ long_description=long_description, |
|
30 |
+ long_description_content_type='text/markdown', |
|
27 | 31 |
version=version, |
28 | 32 |
url='https://github.com/jbweston/miniver', |
29 | 33 |
author='Joseph Weston and Christoph Groth', |
... | ... |
@@ -3,6 +3,9 @@ |
3 | 3 |
from setuptools import setup, find_packages |
4 | 4 |
import sys |
5 | 5 |
|
6 |
+if sys.version_info < (3, 5): |
|
7 |
+ print('Miniver needs at least Python 3.5.') |
|
8 |
+ sys.exit(1) |
|
6 | 9 |
|
7 | 10 |
# Loads version.py module without importing the whole package. |
8 | 11 |
def get_version_and_cmdclass(package_name): |
... | ... |
@@ -31,7 +34,7 @@ setup( |
31 | 34 |
'License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication', |
32 | 35 |
'Topic :: Software Development :: Version Control :: Git', |
33 | 36 |
'Intended Audience :: Developers', |
34 |
- 'Programming Language :: Python', |
|
37 |
+ 'Programming Language :: Python :: 3 :: Only', |
|
35 | 38 |
], |
36 | 39 |
packages=find_packages('.'), |
37 | 40 |
cmdclass=cmdclass, |
Also update README and setup.py to accomodate it.
Joseph Weston authored on 26/02/2018 23:54:00Change 'version.py' to '_version.py' and make the 'version'
module attribute '__version__' instead.
... | ... |
@@ -9,10 +9,10 @@ def get_version_and_cmdclass(package_name): |
9 | 9 |
import os |
10 | 10 |
from importlib.util import module_from_spec, spec_from_file_location |
11 | 11 |
spec = spec_from_file_location('version', |
12 |
- os.path.join(package_name, 'version.py')) |
|
12 |
+ os.path.join(package_name, '_version.py')) |
|
13 | 13 |
module = module_from_spec(spec) |
14 | 14 |
spec.loader.exec_module(module) |
15 |
- return module.version, module.cmdclass |
|
15 |
+ return module.__version__, module.cmdclass |
|
16 | 16 |
|
17 | 17 |
|
18 | 18 |
version, cmdclass = get_version_and_cmdclass('miniver') |
The 'get_version_from_git' code was written by him.
Joseph Weston authored on 23/02/2018 10:17:31... | ... |
@@ -23,7 +23,7 @@ setup( |
23 | 23 |
description='minimal versioning tool', |
24 | 24 |
version=version, |
25 | 25 |
url='https://github.com/jbweston/miniver', |
26 |
- author='Joseph Weston', |
|
26 |
+ author='Joseph Weston and Christoph Groth', |
|
27 | 27 |
author_email='joseph@weston.cloud', |
28 | 28 |
license='CC0', |
29 | 29 |
classifiers=[ |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,37 @@ |
1 |
+# -*- coding: utf-8 -*- |
|
2 |
+ |
|
3 |
+from setuptools import setup, find_packages |
|
4 |
+import sys |
|
5 |
+ |
|
6 |
+ |
|
7 |
+# Loads version.py module without importing the whole package. |
|
8 |
+def get_version_and_cmdclass(package_name): |
|
9 |
+ import os |
|
10 |
+ from importlib.util import module_from_spec, spec_from_file_location |
|
11 |
+ spec = spec_from_file_location('version', |
|
12 |
+ os.path.join(package_name, 'version.py')) |
|
13 |
+ module = module_from_spec(spec) |
|
14 |
+ spec.loader.exec_module(module) |
|
15 |
+ return module.version, module.cmdclass |
|
16 |
+ |
|
17 |
+ |
|
18 |
+version, cmdclass = get_version_and_cmdclass('miniver') |
|
19 |
+ |
|
20 |
+ |
|
21 |
+setup( |
|
22 |
+ name='miniver', |
|
23 |
+ description='minimal versioning tool', |
|
24 |
+ version=version, |
|
25 |
+ url='https://github.com/jbweston/miniver', |
|
26 |
+ author='Joseph Weston', |
|
27 |
+ license='CC0', |
|
28 |
+ classifiers=[ |
|
29 |
+ 'Development Status :: 4 - Beta', |
|
30 |
+ 'License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication', |
|
31 |
+ 'Topic :: Software Development :: Version Control :: Git', |
|
32 |
+ 'Intended Audience :: Developers', |
|
33 |
+ 'Programming Language :: Python', |
|
34 |
+ ], |
|
35 |
+ packages=find_packages('.'), |
|
36 |
+ cmdclass=cmdclass, |
|
37 |
+) |