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
import pkg_resources
READMES = 'README', 'README.rst', 'README.txt'
_default_revctrl = list
......@@ -41,6 +39,8 @@ class sdist(orig.sdist):
negative_opt = {}
READMES = 'README', 'README.rst', 'README.txt'
def run(self):
self.run_command('egg_info')
ei_cmd = self.get_finalized_command('egg_info')
......@@ -128,7 +128,7 @@ class sdist(orig.sdist):
read_template = __read_template_hack
def add_defaults(self):
standards = [READMES,
standards = [self.READMES,
self.distribution.script_name]
for fn in standards:
if isinstance(fn, tuple):
......@@ -180,13 +180,13 @@ class sdist(orig.sdist):
self.filelist.extend(build_scripts.get_source_files())
def check_readme(self):
for f in READMES:
for f in self.READMES:
if os.path.exists(f):
return
else:
self.warn(
"standard file not found: should have one of " +
', '.join(READMES)
', '.join(self.READMES)
)
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