Skip to content

Commit e392ccd

Browse files
committed
pyproject.toml: specify build-system requirements
Using pyproject.toml to specify build system requirements is now the preferred way. From the setuptools documentation[1]: "This used to be accomplished with the setup_requires keyword but is now considered deprecated in favor of the PEP 517 style described above." I didn't remove the 'setup_requires' from setup.py because some users who are using older versions of setuptools might still rely on it if their version of setuptools has no support for pyproject.toml. Without this pyproject.toml, the following command fails on a local network without internet access: pip install --index-url <local index> -e . because setuptools does not take the index into account when fetching the 'setup_requires' dependencies defined in setup.py. However, with the correct pyproject.toml available, the build system requirements are fetched first, using the correct index, and then later at the point where setuptools tries to install the 'setup_requires' dependencies, they are already installed so no need to fetch anything anymore. [1]: https://setuptools.pypa.io/en/latest/userguide/dependency_management.html Signed-off-by: Sam Van Den Berge <sam.van.den.berge@gmail.com>
1 parent b5d7537 commit e392ccd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
# Minimum requirements for the build system to execute.
3+
requires = ["setuptools", "wheel", "setuptools_scm"]

0 commit comments

Comments
 (0)