Skip to content

Commit 5d8db57

Browse files
committed
allow creating wheels for editable packages
1 parent 67f534d commit 5d8db57

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

pip/wheel.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -757,11 +757,8 @@ def build(self, autobuilding=False):
757757
if not autobuilding:
758758
logger.info(
759759
'Skipping %s, due to already being wheel.', req.name)
760-
elif req.editable:
761-
if not autobuilding:
762-
logger.info(
763-
'Skipping bdist_wheel for %s, due to being editable',
764-
req.name)
760+
elif autobuilding and req.editable:
761+
pass
765762
elif autobuilding and req.link and not req.link.is_artifact:
766763
pass
767764
elif autobuilding and not req.source_dir:

tests/unit/test_wheel.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -380,16 +380,6 @@ def test_skip_building_wheels(self, caplog):
380380
assert "due to already being wheel" in caplog.text()
381381
assert mock_build_one.mock_calls == []
382382

383-
def test_skip_building_editables(self, caplog):
384-
with patch('pip.wheel.WheelBuilder._build_one') as mock_build_one:
385-
editable = Mock(editable=True, is_wheel=False, constraint=False)
386-
reqset = Mock(requirements=Mock(values=lambda: [editable]),
387-
wheel_download_dir='/wheel/dir')
388-
wb = wheel.WheelBuilder(reqset, Mock())
389-
wb.build()
390-
assert "due to being editable" in caplog.text()
391-
assert mock_build_one.mock_calls == []
392-
393383

394384
class TestWheelCache:
395385

0 commit comments

Comments
 (0)