Commit 252ee6f4 authored by Jason R. Coombs's avatar Jason R. Coombs

Move READMES definition into class attribute.

parent a0fe4c8e
...@@ -13,8 +13,6 @@ from setuptools.utils import cs_path_exists ...@@ -13,8 +13,6 @@ from setuptools.utils import cs_path_exists
import pkg_resources import pkg_resources
READMES = 'README', 'README.rst', 'README.txt'
_default_revctrl = list _default_revctrl = list
...@@ -41,6 +39,8 @@ class sdist(orig.sdist): ...@@ -41,6 +39,8 @@ class sdist(orig.sdist):
negative_opt = {} negative_opt = {}
READMES = 'README', 'README.rst', 'README.txt'
def run(self): def run(self):
self.run_command('egg_info') self.run_command('egg_info')
ei_cmd = self.get_finalized_command('egg_info') ei_cmd = self.get_finalized_command('egg_info')
...@@ -128,7 +128,7 @@ class sdist(orig.sdist): ...@@ -128,7 +128,7 @@ class sdist(orig.sdist):
read_template = __read_template_hack read_template = __read_template_hack
def add_defaults(self): def add_defaults(self):
standards = [READMES, standards = [self.READMES,
self.distribution.script_name] self.distribution.script_name]
for fn in standards: for fn in standards:
if isinstance(fn, tuple): if isinstance(fn, tuple):
...@@ -180,13 +180,13 @@ class sdist(orig.sdist): ...@@ -180,13 +180,13 @@ class sdist(orig.sdist):
self.filelist.extend(build_scripts.get_source_files()) self.filelist.extend(build_scripts.get_source_files())
def check_readme(self): def check_readme(self):
for f in READMES: for f in self.READMES:
if os.path.exists(f): if os.path.exists(f):
return return
else: else:
self.warn( self.warn(
"standard file not found: should have one of " + "standard file not found: should have one of " +
', '.join(READMES) ', '.join(self.READMES)
) )
def make_release_tree(self, base_dir, files): def make_release_tree(self, base_dir, files):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment