Require minimum Python version in setup.py

less than 1 minute read

Related: Minimal setup.py and setup.cfg


setup.cfg allows fine-grained control of which Python versions are supported. We assume that setup.py is like:

from setuptools import setup; setup()

and then the minimum Python version in setup.cfg:

[options]
python_requires = >= 3.6

How to install local / development

Install development packages (those that you don’t want a fixed static copy of) by:

python -m pip install -e .

or

pip install -e .

That is, in general one should install packages (locally, from GitHub, or from PyPi etc.) via pip install and NOT by invoking setup.py directly.

Notes

Leave a comment