Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 22c0fe2

Browse files
authored
Add a pyproject.toml file (#269)
By explicitly specifying the legacy setuptools build backend via pyproject.toml, we ensure that the current directory is visible to the setup.py invocation. Without this, in some environments I observe that pip installing the sdist or a clone of the repo fails because the current directory is not on the PYTHONPATH (for instance, using cpplint as a pre-commit hook fails for me on some Python/pip versions). Note that this is because the setup.py in this repo imports the cpplint module from the current directory, and for this reason it is necessary to specify that the build backend is `setuptools.build_meta:__legacy__`, not just `setuptools.build_meta`.
1 parent 60429b0 commit 22c0fe2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta:__legacy__"
3+
requires = [
4+
"setuptools",
5+
"wheel",
6+
]

0 commit comments

Comments
 (0)