summaryrefslogtreecommitdiff
path: root/setuptools
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-08-15 18:10:31 +0100
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-08-15 18:10:31 +0100
commit1c96fbe9c3ae7fb476149d2198971fc10ac11298 (patch)
tree0d548ac983059e27cb0af55cde9f31a44404ee3c /setuptools
parente6b911708e900f57c98e3b5b03af6de2953dbc76 (diff)
downloadpython-setuptools-git-1c96fbe9c3ae7fb476149d2198971fc10ac11298.tar.gz
Reproduce error in issue 3523
Diffstat (limited to 'setuptools')
-rw-r--r--setuptools/tests/test_build_meta.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py
index e70c71bd..bf1c27ff 100644
--- a/setuptools/tests/test_build_meta.py
+++ b/setuptools/tests/test_build_meta.py
@@ -485,6 +485,23 @@ class TestBuildMetaBackend:
assert os.path.isfile(os.path.join(dist_dir, dist_info, 'METADATA'))
+ def test_prepare_metadata_inplace(self, build_backend):
+ """
+ Some users might pass metadata_directory pre-populated with `.tox` or `.venv`.
+ See issue #3523.
+ """
+ for pre_existing in [
+ ".tox/python/lib/python3.10/site-packages/attrs-22.1.0.dist-info",
+ ".tox/python/lib/python3.10/site-packages/autocommand-2.2.1.dist-info",
+ ".nox/python/lib/python3.10/site-packages/build-0.8.0.dist-info",
+ ".venv/python3.10/site-packages/click-8.1.3.dist-info",
+ "venv/python3.10/site-packages/distlib-0.3.5.dist-info",
+ "env/python3.10/site-packages/docutils-0.19.dist-info",
+ ]:
+ os.makedirs(pre_existing, exist_ok=True)
+ dist_info = build_backend.prepare_metadata_for_build_wheel(".")
+ assert os.path.isfile(os.path.join(dist_info, 'METADATA'))
+
def test_build_sdist_explicit_dist(self, build_backend):
# explicitly specifying the dist folder should work
# the folder sdist_directory and the ``--dist-dir`` can be the same