summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/command/sdist.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-06-07 15:31:39 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-06-07 15:31:39 (GMT)
commit313570a1851bbe8c44af07be2eceb021fea6c994 (patch)
tree19e92183602f61a4d6d107c8569440baf8cab213 /Lib/packaging/command/sdist.py
parent1752468d39a38ac73ec13fc1f8f6427623b69074 (diff)
parent69cdf9294fee18e3b38278f2baf00c15c7bdbd8e (diff)
downloadcpython-313570a1851bbe8c44af07be2eceb021fea6c994.zip
cpython-313570a1851bbe8c44af07be2eceb021fea6c994.tar.gz
cpython-313570a1851bbe8c44af07be2eceb021fea6c994.tar.bz2
Branch merge: packaging fixes
Diffstat (limited to 'Lib/packaging/command/sdist.py')
-rw-r--r--Lib/packaging/command/sdist.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/Lib/packaging/command/sdist.py b/Lib/packaging/command/sdist.py
index a19203f..09b26db 100644
--- a/Lib/packaging/command/sdist.py
+++ b/Lib/packaging/command/sdist.py
@@ -201,15 +201,20 @@ class sdist(Command):
self.filelist.write(self.manifest)
def add_defaults(self):
- """Add all the default files to self.filelist:
- - all pure Python modules mentioned in setup script
- - all files pointed by package_data (build_py)
- - all files defined in data_files.
- - all files defined as scripts.
- - all C sources listed as part of extensions or C libraries
- in the setup script (doesn't catch C headers!)
- Everything is optional.
+ """Add all default files to self.filelist.
+
+ In addition to the setup.cfg file, this will include all files returned
+ by the get_source_files of every registered command. This will find
+ Python modules and packages, data files listed in package_data_,
+ data_files and extra_files, scripts, C sources of extension modules or
+ C libraries (headers are missing).
"""
+ if os.path.exists('setup.cfg'):
+ self.filelist.append('setup.cfg')
+ else:
+ logger.warning("%s: standard 'setup.cfg' file not found",
+ self.get_command_name())
+
for cmd_name in get_command_names():
try:
cmd_obj = self.get_finalized_command(cmd_name)