Skip to content

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

@uranusjr

Description

@uranusjr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions