michilu/python-functools32

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

uranusjr opened this issue · 1 comments

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.

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