Skip to content

Commit 5551217

Browse files
committed
Resolve a DeprecationWarning by adding a pyproject.toml
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 nedbat#117
1 parent 269dd08 commit 5551217

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Fixed
2+
.....
3+
4+
- Add a ``pyproject.toml`` file to resolve a ``DeprecationWarning``
5+
when installing the project in editable mode.

pyproject.toml

Lines changed: 3 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ commands =
2828
python -V
2929
pandoc --version
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:coverage]
3434
depends = py39,py310,py311,py312,py313,pypy3

0 commit comments

Comments
 (0)