summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-04-04 01:06:29 +0100
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-06-15 16:43:45 +0100
commitaee32452f9cf2ceb3234a1749ccd0ad3eb166e11 (patch)
treec9ea49831d515bc044e37da2212bdd2a0dee7a85
parent5866b8563cc35d01d08053d8142f4c09255a07f3 (diff)
downloadpython-setuptools-git-aee32452f9cf2ceb3234a1749ccd0ad3eb166e11.tar.gz
Re-use dist-info dir for build_editable
-rw-r--r--setuptools/build_meta.py3
-rw-r--r--setuptools/command/editable_wheel.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py
index 39c88837..1d67e756 100644
--- a/setuptools/build_meta.py
+++ b/setuptools/build_meta.py
@@ -260,7 +260,8 @@ class _BuildMetaBackend:
):
# XXX can or should we hide our editable_wheel command normally?
return self._build_with_temp_dir(
- ["editable_wheel"], ".whl", wheel_directory, config_settings
+ ["editable_wheel", "--dist-info-dir", metadata_directory],
+ ".whl", wheel_directory, config_settings
)
def get_requires_for_build_editable(self, config_settings=None):
diff --git a/setuptools/command/editable_wheel.py b/setuptools/command/editable_wheel.py
index 199dbd7c..d44d216f 100644
--- a/setuptools/command/editable_wheel.py
+++ b/setuptools/command/editable_wheel.py
@@ -62,10 +62,11 @@ class editable_wheel(Command):
self.dist_info_dir = dist_info.dist_info_dir
else:
assert str(self.dist_info_dir).endswith(".dist-info")
- assert list(Path(self.dist_info_dir).glob("*.dist-info/METADATA"))
+ assert Path(self.dist_info_dir, "METADATA").exists()
def _create_wheel_file(self, bdist_wheel):
from wheel.wheelfile import WheelFile
+
dist_info = self.get_finalized_command("dist_info")
tag = "-".join(bdist_wheel.get_tag())
editable_name = dist_info.name