aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/sdist.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/command/sdist.py')
-rwxr-xr-xsetuptools/command/sdist.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py
index 91c4fd1b..a176f635 100755
--- a/setuptools/command/sdist.py
+++ b/setuptools/command/sdist.py
@@ -198,6 +198,14 @@ class sdist(_sdist):
if self.distribution.has_pure_modules():
build_py = self.get_finalized_command('build_py')
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():
build_ext = self.get_finalized_command('build_ext')