Skip to content

Commit b2ec681

Browse files
jdufresnecarltongibson
authored andcommitted
Pass python_requires argument to setuptools (#5739)
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.
1 parent ffe3dbb commit b2ec681

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/topics/project-management.md

+5
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ The following template should be used for the description of the issue, and serv
105105
Checklist:
106106

107107
- [ ] Create pull request for [release notes](https://github.com/encode/django-rest-framework/blob/master/docs/topics/release-notes.md) based on the [*.*.* milestone](https://github.com/encode/django-rest-framework/milestones/***).
108+
- [ ] Update supported versions:
109+
- [ ] `setup.py` `python_requires` list
110+
- [ ] `setup.py` Python & Django version trove classifiers
111+
- [ ] `README` Python & Django versions
112+
- [ ] `docs` Python & Django versions
108113
- [ ] Update the translations from [transifex](http://www.django-rest-framework.org/topics/project-management/#translations).
109114
- [ ] Ensure the pull request increments the version to `*.*.*` in [`restframework/__init__.py`](https://github.com/encode/django-rest-framework/blob/master/rest_framework/__init__.py).
110115
- [ ] Confirm with @tomchristie that release is finalized and ready to go.

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def get_version(package):
6262
packages=find_packages(exclude=['tests*']),
6363
include_package_data=True,
6464
install_requires=[],
65+
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
6566
zip_safe=False,
6667
classifiers=[
6768
'Development Status :: 5 - Production/Stable',

0 commit comments

Comments
 (0)