summaryrefslogtreecommitdiff
path: root/setuptools/command/egg_info.py
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2023-01-19 10:19:31 +0000
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2023-01-19 11:19:13 +0000
commit4e766834d72623f3b938f1d4148547ea73af1bf5 (patch)
tree2e94b38c842274eb74b10afcc877313ad84c6946 /setuptools/command/egg_info.py
parent596d9db7e89ddc6d16142344cc19e1ba7da5b090 (diff)
downloadpython-setuptools-git-4e766834d72623f3b938f1d4148547ea73af1bf5.tar.gz
Add files referenced by file: directive in setup.cfg to sdist
Diffstat (limited to 'setuptools/command/egg_info.py')
-rw-r--r--setuptools/command/egg_info.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
index 1885efb0..194230a9 100644
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -565,6 +565,7 @@ class manifest_maker(sdist):
if os.path.exists(self.template):
self.read_template()
self.add_license_files()
+ self._add_referenced_files()
self.prune_file_list()
self.filelist.sort()
self.filelist.remove_duplicates()
@@ -622,6 +623,12 @@ class manifest_maker(sdist):
pass
self.filelist.extend(license_files)
+ def _add_referenced_files(self):
+ """Add files referenced by the config (e.g. `file:` directive) to filelist"""
+ referenced = getattr(self.distribution, '_referenced_files', [])
+ # ^-- fallback if dist comes from distutils or is a custom class
+ self.filelist.extend(referenced)
+
def prune_file_list(self):
build = self.get_finalized_command('build')
base_dir = self.distribution.get_fullname()