Browse code

clarify stance on Python 2 support

Joseph Weston authored on 07/03/2018 15:01:23
Showing 3 changed files
... ...
@@ -15,9 +15,13 @@ version strings everywhere.
15 15
 
16 16
 This is the same problem that Versioneer solves, but Miniver is less
17 17
 than 200 lines of code, whereas Versioneer is over 2000. The tradeoff
18
-is that Miniver only works with Git, and has not been tested across
19
-different platforms and Python versions (yet).
18
+is that Miniver only works with Git and Python 3.5 (or above), and has only been
19
+tested on Debian Linux and Mac OSX (so far).
20 20
 
21
+Support for Python 2 is not a goal, as Python 2 is fast approaching its
22
+end of life (2020), and we want to encourage people to use Python 3!
23
+That being said, Christian Marquardt has a [fork that also
24
+works with Python 2](https://github.com/cmarquardt/miniver)
21 25
 
22 26
 [versioneer]: https://github.com/warner/python-versioneer
23 27
 [cc0]: http://creativecommons.org/publicdomain/zero/1.0/
... ...
@@ -12,6 +12,10 @@ from zipfile import ZipFile
12 12
 from importlib.util import find_spec
13 13
 from urllib.request import urlretrieve
14 14
 
15
+if sys.version_info < (3, 5):
16
+    print('Miniver needs at least Python 3.5')
17
+    sys.exit(1)
18
+
15 19
 try:
16 20
     import miniver
17 21
     del miniver
... ...
@@ -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,