]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Pass python_requires argument to setuptools 797/head
authorJon Dufresne <jon.dufresne@gmail.com>
Thu, 11 Jan 2018 13:55:37 +0000 (05:55 -0800)
committerJon Dufresne <jon.dufresne@gmail.com>
Thu, 30 Aug 2018 03:25:02 +0000 (20:25 -0700)
Helps pip decide what version of the library to install.

https://packaging.python.org/tutorials/distributing-packages/#python-requires

> If your project only runs on certain Python versions, setting the
> python_requires argument to the appropriate PEP 440 version specifier
> string will prevent pip from installing the project on other Python
> versions.

https://setuptools.readthedocs.io/en/latest/setuptools.html#new-and-changed-setup-keywords

> python_requires
>
> A string corresponding to a version specifier (as defined in PEP 440)
> for the Python version, used to specify the Requires-Python defined in
> PEP 345.

setup.py

index 7c3f33d996bb73a2119162dc68840190837144a3..b2b9d520bc2383d313a8614e7565f640beb22f29 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -68,6 +68,7 @@ setup(
         'Topic :: Text Processing :: Markup :: HTML'
     ],
     packages=['jinja2'],
+    python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
     install_requires=['MarkupSafe>=0.23'],
     extras_require={'i18n': ['Babel>=0.8']},
     include_package_data=True,