michilu / python-functools32

Backport of the functools module from Python 3.2.3 for use with Python 2.7 and PyPy. Includes `lru_cache` (Least-recently-used cache decorator)
http://pypi.python.org/pypi/functools32
Other
52 stars 14 forks source link

Don’t hard-error if setup.py is run from an incompatible Python #9

Open uranusjr opened 5 years ago

uranusjr commented 5 years ago

setup.py can be used for a lot more places than installing. For example, dependency resolution tools (e.g. Pipenv) uses setup.py egg_info to check the dependencies of a package. The current implementation, however, breaks the process since it unnecessarily refuses to be run.

The pragmatic way to specify a Python version requirement is to use the python_requires parameter instead. This guarentees the correct behaviour for both setuptools and pip released after November 2016, which is generally good enough. If backwards compatibility of tooling is a serious concern, a runtime check to check for versions of setuptools and pip would also avoid the restriction in most cases.

stuaxo commented 5 years ago

@uranusjr fancy making a PR, then we can ask if the maintainer will merge it ?