From 10d5eef8e53a968efc3aff1153a9eb8c6e3e59f3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 14:44:11 -0400 Subject: Get names for README files from class attribute, allowing subclass to override. --- Lib/distutils/command/sdist.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py index 28cd0d9..e512166 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 -- cgit v0.12