Add python_requires and python3 only specifiers
authorPhilippe Pepiot <philippe.pepiot@logilab.fr>
Wed, 06 Nov 2019 11:49:59 +0100
changeset 870 4e54f0b7946f
parent 869 d521e746de34
child 871 09d3fed6a415
Add python_requires and python3 only specifiers This allow pip to install a older python2 compatible package if running with python2. The "Programming Language :: Python :: 3 :: Only" is just for pypi statistics AFAIK.
__pkginfo__.py
setup.py
--- a/__pkginfo__.py	Wed Nov 06 11:22:40 2019 +0100
+++ b/__pkginfo__.py	Wed Nov 06 11:49:59 2019 +0100
@@ -44,8 +44,8 @@
 classifiers = [
     'License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)',
     'Programming Language :: Python',
-    'Programming Language :: Python :: 2',
     'Programming Language :: Python :: 3',
+    'Programming Language :: Python :: 3 :: Only',
     'Topic :: Database',
     'Topic :: Software Development :: Libraries :: Python Modules',
 ]
--- a/setup.py	Wed Nov 06 11:22:40 2019 +0100
+++ b/setup.py	Wed Nov 06 11:49:59 2019 +0100
@@ -77,6 +77,7 @@
     # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
     classifiers=pkginfo.get('classifiers', []),
     packages=find_packages(exclude=['contrib', 'docs', 'test*']),
+    python_requires='>=3.4',
     install_requires=pkginfo.get('install_requires'),
     tests_require=pkginfo.get('tests_require'),
     scripts=pkginfo.get('scripts', []),