From: Jason R. Coombs Date: Fri, 14 Oct 2016 18:44:11 +0000 (-0400) Subject: Get names for README files from class attribute, allowing subclass to override. X-Git-Tag: v3.7.0a1~2229 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10d5eef8e53a968efc3aff1153a9eb8c6e3e59f3;p=thirdparty%2FPython%2Fcpython.git Get names for README files from class attribute, allowing subclass to override. --- diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py index 28cd0d9ef1e8..e5121666b88f 100644 --- a/Lib/distutils/command/sdist.py +++ b/Lib/distutils/command/sdist.py @@ -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