summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2019-06-16 16:35:00 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2019-06-16 16:51:04 +0200
commit0854c2d82b7d0c2eb743fa954f3be34938fb6007 (patch)
tree0b33a92dd5149555533eb26e5181ff1c4304c33d
parentab596da7991dc5b91b047fc741c9da23ae051e1a (diff)
downloadpygobject-0854c2d82b7d0c2eb743fa954f3be34938fb6007.tar.gz
setup.py: add python_requires
It gets used by pip>=9 to decide which version from pypi to install. Which means we can more easily drop older Python versions without having to worry about breaking anyones setup. Sadly our oldest supported system, Ubuntu Xenial, only has pip 8, so it will install the newest version and fail anyway if we drop Python 3.5 support. We can at least point users to update their pip in their virtual environments then. https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
-rwxr-xr-xsetup.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index b9172131..6f6f86df 100755
--- a/setup.py
+++ b/setup.py
@@ -1272,6 +1272,8 @@ def main():
"install_pkgconfig": install_pkgconfig,
},
install_requires=install_requires,
+ python_requires=(
+ '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4'),
data_files=[
('include/pygobject-3.0', ['gi/pygobject.h']),
],