File tree 3 files changed +23
-2
lines changed
3 files changed +23
-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 @@ -825,6 +825,21 @@ def install(
825
825
)
826
826
827
827
if self .editable and not self .is_wheel :
828
+ deprecated (
829
+ reason = (
830
+ f"Legacy editable install of { self } (setup.py develop) "
831
+ "is deprecated."
832
+ ),
833
+ replacement = (
834
+ "to add a pyproject.toml or enable --use-pep517, "
835
+ "and use setuptools >= 64. "
836
+ "If the resulting installation is not behaving as expected, "
837
+ "try using --config-settings editable_mode=compat. "
838
+ "Please consult the setuptools documentation for more information"
839
+ ),
840
+ gone_in = "25.0" ,
841
+ issue = 11457 ,
842
+ )
828
843
if self .config_settings :
829
844
logger .warning (
830
845
"--config-settings ignored for legacy editable install of %s. "
Original file line number Diff line number Diff line change @@ -1350,7 +1350,7 @@ def test_install_package_with_prefix(
1350
1350
1351
1351
def _test_install_editable_with_prefix (
1352
1352
script : PipTestEnvironment , files : Dict [str , str ]
1353
- ) -> None :
1353
+ ) -> TestPipResult :
1354
1354
# make a dummy project
1355
1355
pkga_path = script .scratch_path / "pkga"
1356
1356
pkga_path .mkdir ()
@@ -1378,6 +1378,8 @@ def _test_install_editable_with_prefix(
1378
1378
install_path = script .scratch / site_packages / "pkga.egg-link"
1379
1379
result .did_create (install_path )
1380
1380
1381
+ return result
1382
+
1381
1383
1382
1384
@pytest .mark .network
1383
1385
def test_install_editable_with_target (script : PipTestEnvironment ) -> None :
@@ -1427,9 +1429,10 @@ def test_install_editable_legacy_with_prefix_setup_cfg(
1427
1429
requires = ["setuptools<64", "wheel"]
1428
1430
build-backend = "setuptools.build_meta"
1429
1431
"""
1430
- _test_install_editable_with_prefix (
1432
+ result = _test_install_editable_with_prefix (
1431
1433
script , {"setup.cfg" : setup_cfg , "pyproject.toml" : pyproject_toml }
1432
1434
)
1435
+ assert "(setup.py develop) is deprecated" in result .stderr
1433
1436
1434
1437
1435
1438
def test_install_package_conflict_prefix_and_user (
You can’t perform that action at this time.
0 commit comments