lechifflart / BGWpy

BerkeleyGW python
Other
0 stars 0 forks source link

Editable install is deprecated for pip>=25.0 #2

Open DaanHolleman opened 1 month ago

DaanHolleman commented 1 month ago

Newer versions of pip will no longer allow for editable installs using a setup.py script. Switching to a pyproject.toml instead of a setup.py script seems like the best decision.

Message from pip:

DEPRECATION: Legacy editable install of BGWpy==3.2.3 from file:///C:/Users/dholl/Documents/GitHub/BGWpy (setup.py develop) is deprecated. pip 25.0 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 https://github.com/pypa/pip/issues/11457

Comment by ichard26:

The key phrase is that things will break if your package is already broken when the modern editable install mechanism is used. The breakage possible with pip 25 is that the automatic fallback that keeps those packages working will be removed. ... The main reason to do nothing would be with legacy, read-only projects or archives as you've mentioned.

DaanHolleman commented 1 month ago

Manual conversion should be pretty easy as the setup.py is pretty small. The following needs to be in the pyproject.toml:

[build-system]
# XXX: If your project needs other packages to build properly, add them to this list.
requires = ["setuptools >= 64"]
build-backend = "setuptools.build_meta"