aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_build_meta.py
diff options
context:
space:
mode:
authorPaul Ganssle <paul@ganssle.io>2018-11-02 20:29:40 -0400
committerPaul Ganssle <paul@ganssle.io>2018-11-03 13:09:22 -0400
commitbff67db79c5c1f65cde5fea9919f121dacbc0e7b (patch)
tree106c81e047b38819f967c3079f379c1ffee0e664 /setuptools/tests/test_build_meta.py
parent6d8a4ebcd6a9e61ac92146d2e41deeb92a7a5ec1 (diff)
downloadexternal_python_setuptools-bff67db79c5c1f65cde5fea9919f121dacbc0e7b.tar.gz
external_python_setuptools-bff67db79c5c1f65cde5fea9919f121dacbc0e7b.tar.bz2
external_python_setuptools-bff67db79c5c1f65cde5fea9919f121dacbc0e7b.zip
Test that manifest can exclude setup.py
Diffstat (limited to 'setuptools/tests/test_build_meta.py')
-rw-r--r--setuptools/tests/test_build_meta.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py
index 82a5511c..940780cf 100644
--- a/setuptools/tests/test_build_meta.py
+++ b/setuptools/tests/test_build_meta.py
@@ -193,3 +193,24 @@ def test_build_sdist_setup_py_exists(tmpdir_cwd):
with tarfile.open(os.path.join("temp", targz_path)) as tar:
assert any('setup.py' in name for name in tar.getnames())
+
+def test_build_sdist_setup_py_manifest_excluded(tmpdir_cwd):
+ # Ensure that MANIFEST.in can exclude setup.py
+ files = {
+ 'setup.py': DALS("""
+ __import__('setuptools').setup(
+ name='foo',
+ version='0.0.0',
+ py_modules=['hello']
+ )"""),
+ 'hello.py': '',
+ 'MANIFEST.in': DALS("""
+ exclude setup.py
+ """)
+ }
+
+ build_files(files)
+ targz_path = build_sdist("temp")
+ with tarfile.open(os.path.join("temp", targz_path)) as tar:
+ assert not any('setup.py' in name for name in tar.getnames())
+