summaryrefslogtreecommitdiff
path: root/setuptools/tests
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-11-23 14:14:02 +0000
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-11-23 14:14:02 +0000
commitad262229d2fb5ff142a82d155e4a072732f9955b (patch)
tree35b927b250bbcb220e176ac4c8eade3c7015cb87 /setuptools/tests
parent8f2cf582a0cdc3ee2ec9af45d2260714b5026823 (diff)
parent9a020ce8471624d20b426e2c5e2241c81a899918 (diff)
downloadpython-setuptools-git-ad262229d2fb5ff142a82d155e4a072732f9955b.tar.gz
Fix build directories interference with auto-discovery (#3704)
Diffstat (limited to 'setuptools/tests')
-rw-r--r--setuptools/tests/test_config_discovery.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/setuptools/tests/test_config_discovery.py b/setuptools/tests/test_config_discovery.py
index 85b64b31..f65b00b6 100644
--- a/setuptools/tests/test_config_discovery.py
+++ b/setuptools/tests/test_config_discovery.py
@@ -248,6 +248,19 @@ class TestDiscoverPackagesAndPyModules:
with pytest.raises(PackageDiscoveryError, match="multiple (packages|modules)"):
_get_dist(tmp_path, {})
+ def test_py_modules_when_wheel_dir_is_cwd(self, tmp_path):
+ """Regression for issue 3692"""
+ from setuptools import build_meta
+
+ pyproject = '[project]\nname = "test"\nversion = "1"'
+ (tmp_path / "pyproject.toml").write_text(DALS(pyproject), encoding="utf-8")
+ (tmp_path / "foo.py").touch()
+ with jaraco.path.DirectoryStack().context(tmp_path):
+ build_meta.build_wheel(".")
+ # Ensure py_modules are found
+ wheel_files = get_wheel_members(next(tmp_path.glob("*.whl")))
+ assert "foo.py" in wheel_files
+
class TestNoConfig:
DEFAULT_VERSION = "0.0.0" # Default version given by setuptools