File tree 3 files changed +17
-2
lines changed
3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change
1
+ Deprecate ``pip install --editable `` falling back to ``setup.py develop ``
2
+ when using a setuptools version that does not support :pep: `660 `
3
+ (setuptools v63 and older).
Original file line number Diff line number Diff line change @@ -824,6 +824,15 @@ def install(
824
824
)
825
825
826
826
if self .editable and not self .is_wheel :
827
+ deprecated (
828
+ reason = f"Legacy editable install of { self } is deprecated." ,
829
+ replacement = (
830
+ "to upgrade setuptools to a version that supports PEP 660 (>= 64), "
831
+ "or to install the package in non-editable mode"
832
+ ),
833
+ gone_in = "25.0" ,
834
+ issue = 11457 ,
835
+ )
827
836
if self .config_settings :
828
837
logger .warning (
829
838
"--config-settings ignored for legacy editable install of %s. "
Original file line number Diff line number Diff line change @@ -1338,7 +1338,7 @@ def test_install_package_with_prefix(
1338
1338
1339
1339
def _test_install_editable_with_prefix (
1340
1340
script : PipTestEnvironment , files : Dict [str , str ]
1341
- ) -> None :
1341
+ ) -> TestPipResult :
1342
1342
# make a dummy project
1343
1343
pkga_path = script .scratch_path / "pkga"
1344
1344
pkga_path .mkdir ()
@@ -1366,6 +1366,8 @@ def _test_install_editable_with_prefix(
1366
1366
install_path = script .scratch / site_packages / "pkga.egg-link"
1367
1367
result .did_create (install_path )
1368
1368
1369
+ return result
1370
+
1369
1371
1370
1372
@pytest .mark .network
1371
1373
def test_install_editable_with_target (script : PipTestEnvironment ) -> None :
@@ -1415,9 +1417,10 @@ def test_install_editable_legacy_with_prefix_setup_cfg(
1415
1417
requires = ["setuptools<64", "wheel"]
1416
1418
build-backend = "setuptools.build_meta"
1417
1419
"""
1418
- _test_install_editable_with_prefix (
1420
+ result = _test_install_editable_with_prefix (
1419
1421
script , {"setup.cfg" : setup_cfg , "pyproject.toml" : pyproject_toml }
1420
1422
)
1423
+ assert "upgrade setuptools to a version that supports PEP 660" in result .stderr
1421
1424
1422
1425
1423
1426
def test_install_package_conflict_prefix_and_user (
You can’t perform that action at this time.
0 commit comments