Skip to content

Commit b2362cd

Browse files
authored
build: resolve a DeprecationWarning by adding a pyproject.toml (#139)
This resolves the following warning when running `pip install -e.`: ``` DEPRECATION: Legacy editable install of scriv==1.5.1 from file:///path/to/scriv (setup.py develop) is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at pypa/pip#11457 ``` It appears that scriv can still be packaged by running `python -m build` after this change. Note that pytest must now be explicitly configured to load its configuration from `setup.cfg`. Otherwise, it will detect `pyproject.toml` and attempt to import tomli, which is uninstalled when the test suite is running the `-no_extras` factor. Closes #117
1 parent 2baba4b commit b2362cd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ setenv =
2828
no_extras: SCRIV_TEST_NO_EXTRAS=1
2929
commands =
3030
no_extras: python -m pip uninstall -q -y tomli
31-
coverage run -p -m pytest -Wd {posargs}
31+
coverage run -p -m pytest -Wd -c setup.cfg {posargs}
3232

3333
[testenv:deps]
3434
allowlist_externals =

0 commit comments

Comments
 (0)