summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt1
-rwxr-xr-xsetuptools/command/sdist.py12
2 files changed, 12 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 086ebdee..98e2246b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -13,6 +13,7 @@ CHANGES
before testing it.
* Issue #306: Even if 2to3 is used, we build in-place under Python 2.
* Issue #307: Prints the full path when .svn/entries is broken.
+* Issue #313: Support for sdist subcommands (Python 2.7)
------
0.6.28
diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py
index 16d3c37b..91c4fd1b 100755
--- a/setuptools/command/sdist.py
+++ b/setuptools/command/sdist.py
@@ -147,7 +147,17 @@ class sdist(_sdist):
self.filelist = ei_cmd.filelist
self.filelist.append(os.path.join(ei_cmd.egg_info,'SOURCES.txt'))
self.check_readme()
- self.check_metadata()
+
+ # Run sub commands
+ for cmd_name in self.get_sub_commands():
+ self.run_command(cmd_name)
+
+ # Call check_metadata only if no 'check' command
+ # (distutils <= 2.6)
+ import distutils.command
+ if 'check' not in distutils.command.__all__:
+ self.check_metadata()
+
self.make_distribution()
dist_files = getattr(self.distribution,'dist_files',[])