[pygobject/pygobject-3-32] setup.py: add python_requires



commit 0854c2d82b7d0c2eb743fa954f3be34938fb6007
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Sun Jun 16 16:35:00 2019 +0200

    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

 setup.py | 2 ++
 1 file changed, 2 insertions(+)
---
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']),
         ],


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]