summaryrefslogtreecommitdiff
path: root/distutils2/command/sdist.py
diff options
context:
space:
mode:
authorTarek Ziade <tarek@ziade.org>2010-10-02 14:51:50 +0200
committerTarek Ziade <tarek@ziade.org>2010-10-02 14:51:50 +0200
commita06c5e831a0c20550bea7dde47e688daf4ac658b (patch)
tree3566a50a240a5ae4faaf9df7b0f7fc41bfbce52f /distutils2/command/sdist.py
parent0ffad5bbc24ff167edac5f1449470720fe892e79 (diff)
downloaddisutils2-a06c5e831a0c20550bea7dde47e688daf4ac658b.tar.gz
removed setup.py from the list of files included by default, and make sure the list builder dont die on a command
Diffstat (limited to 'distutils2/command/sdist.py')
-rw-r--r--distutils2/command/sdist.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/distutils2/command/sdist.py b/distutils2/command/sdist.py
index 4e7764c..b54c2cd 100644
--- a/distutils2/command/sdist.py
+++ b/distutils2/command/sdist.py
@@ -197,7 +197,6 @@ class sdist(Command):
def add_defaults(self):
"""Add all the default files to self.filelist:
- README or README.txt
- - setup.py
- test/test*.py
- all pure Python modules mentioned in setup script
- all files pointed by package_data (build_py)
@@ -208,8 +207,7 @@ class sdist(Command):
Warns if (README or README.txt) or setup.py are missing; everything
else is optional.
"""
-
- standards = [('README', 'README.txt'), self.distribution.script_name]
+ standards = [('README', 'README.txt')]
for fn in standards:
if isinstance(fn, tuple):
alts = fn
@@ -236,8 +234,12 @@ class sdist(Command):
self.filelist.extend(files)
for cmd_name in self.distribution.get_command_names():
- cmd_obj = self.get_finalized_command(cmd_name)
- self.filelist.extend(cmd_obj.get_source_files())
+ try:
+ cmd_obj = self.get_finalized_command(cmd_name)
+ except DistutilsOptionError:
+ pass
+ else:
+ self.filelist.extend(cmd_obj.get_source_files())
def prune_file_list(self):
"""Prune off branches that might slip into the file list as created