1. Daniel Holth
  2. setup-requires




An example of a working build-system requires implementation. For those times when your setup.py needs to import a dependency.


This package should not be installed! Instead, prepend setup-requires' setup.py to your own. List only the requirements setup.py itself needs to run in pyproject.toml:

# Example build requirements folling build-deps-pep
requires = ["cffi", "pycparser >= 2.10"]

(Only the name and required versions are allowed, not the full pip syntax of URLs to specific repositories. Instead, install internal setup-requires dependencies manually or set PIP_FIND_LINKS=... to point to the necessary repositories.)

When run, setup-requires' setup.py checks that each distribution listed is installed; if not, it installs them into the ./setup-requires directory in a pip subprocess. The normal setup.py contents can simply be pasted below the bootstrap code.