summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-01-30 20:22:27 (GMT)
committerGreg Ward <gward@python.net>2000-01-30 20:22:27 (GMT)
commitd1466b968f38efd8e6098c8cd21bed15e9791e21 (patch)
tree2ccf56c95df51f024e92b9521127c0a132061816 /Lib/distutils
parenta002edc85b25160cfffe610df9ab7337efc8f0c0 (diff)
downloadcpython-d1466b968f38efd8e6098c8cd21bed15e9791e21.zip
cpython-d1466b968f38efd8e6098c8cd21bed15e9791e21.tar.gz
cpython-d1466b968f38efd8e6098c8cd21bed15e9791e21.tar.bz2
Allow either README or README.txt as a "standard file".
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/command/dist.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/Lib/distutils/command/dist.py b/Lib/distutils/command/dist.py
index 76332b2..ea61a48 100644
--- a/Lib/distutils/command/dist.py
+++ b/Lib/distutils/command/dist.py
@@ -219,12 +219,24 @@ class Dist (Command):
def find_defaults (self):
- standards = ['README', 'setup.py']
+ standards = [('README', 'README.txt'), 'setup.py']
for fn in standards:
- if os.path.exists (fn):
- self.files.append (fn)
+ if type (fn) is TupleType:
+ alts = fn
+ for fn in alts:
+ if os.path.exists (fn):
+ got_it = 1
+ self.files.append (fn)
+ break
+
+ if not got_it:
+ self.warn ("standard file not found: should have one of " +
+ string.join (alts, ', '))
else:
- self.warn ("standard file %s not found" % fn)
+ if os.path.exists (fn):
+ self.files.append (fn)
+ else:
+ self.warn ("standard file %s not found" % fn)
optional = ['test/test*.py']
for pattern in optional: