Commit f6cb3d29 authored by Erik Bray's avatar Erik Bray

This allows the sdist command to ensure that any files listed in package_data...

This allows the sdist command to ensure that any files listed in package_data are included in the dist, regardless of whether it's under version control, as is the case with distutil's sdist.  Setting include_package_data=True disables this functionality.

--HG--
branch : distribute
extra : rebase_source : 2cae1675c638dc12fd556368074c6b5c691c6f58
parent f4a592c1
...@@ -186,6 +186,14 @@ class sdist(_sdist): ...@@ -186,6 +186,14 @@ class sdist(_sdist):
if self.distribution.has_pure_modules(): if self.distribution.has_pure_modules():
build_py = self.get_finalized_command('build_py') build_py = self.get_finalized_command('build_py')
self.filelist.extend(build_py.get_source_files()) self.filelist.extend(build_py.get_source_files())
# This functionality is incompatible with include_package_data, and
# will in fact create an infinite recursion if include_package_data
# is True. Use of include_package_data will imply that
# distutils-style automatic handling of package_data is disabled
if not self.distribution.include_package_data:
for _, src_dir, _, filenames in build_py.data_files:
self.filelist.extend([os.path.join(src_dir, filename)
for filename in filenames])
if self.distribution.has_ext_modules(): if self.distribution.has_ext_modules():
build_ext = self.get_finalized_command('build_ext') build_ext = self.get_finalized_command('build_ext')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment