diff options
author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2023-01-19 10:18:43 +0000 |
---|---|---|
committer | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2023-01-19 11:19:05 +0000 |
commit | 596d9db7e89ddc6d16142344cc19e1ba7da5b090 (patch) | |
tree | 608008a792dc8ef0fd868747aebd55f0805e8be4 | |
parent | ca3198a52d48123d4d8e67952f1c9d5abba38d1f (diff) | |
download | python-setuptools-git-596d9db7e89ddc6d16142344cc19e1ba7da5b090.tar.gz |
Capture expectation about file: directive in setup.cfg to be in the sdist
-rw-r--r-- | setuptools/tests/test_sdist.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 30631c24..af5f68ea 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -498,6 +498,30 @@ class TestSdistTest: filename = filename.decode('latin-1') filename not in cmd.filelist.files + def test_add_setup_cfg_referenced_files(self, tmpdir): + touch(tmpdir / 'README.rst') + touch(tmpdir / 'USAGE.rst') + + with open(tmpdir / 'setup.cfg', 'w') as f: + f.writelines(""" + [metadata] + long_description = file: README.rst, USAGE.rst + [options] + packages = find: + """) + + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + dist.parse_config_files() + + cmd = sdist(dist) + cmd.ensure_finalized() + with quiet(): + cmd.run() + + assert 'README.rst' in cmd.filelist.files + assert 'USAGE.rst' in cmd.filelist.files + def test_pyproject_toml_in_sdist(self, tmpdir): """ Check if pyproject.toml is included in source distribution if present |