]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Get names for README files from class attribute, allowing subclass to override.
authorJason R. Coombs <jaraco@jaraco.com>
Fri, 14 Oct 2016 18:44:11 +0000 (14:44 -0400)
committerJason R. Coombs <jaraco@jaraco.com>
Fri, 14 Oct 2016 18:44:11 +0000 (14:44 -0400)
Lib/distutils/command/sdist.py

index 28cd0d9ef1e8fbc2fdcbbdb163d69e11d2cb26ef..e5121666b88f3522ff7ffd00f9272ac6c5a6bf1c 100644 (file)
@@ -95,6 +95,8 @@ class sdist(Command):
 
     sub_commands = [('check', checking_metadata)]
 
+    READMES = 'README', 'README.txt'
+
     def initialize_options(self):
         # 'template' and 'manifest' are, respectively, the names of
         # the manifest template and manifest file.
@@ -218,7 +220,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 = [self.READMES, self.distribution.script_name]
         for fn in standards:
             if isinstance(fn, tuple):
                 alts = fn