diff options
Diffstat (limited to 'setuptools/command')
-rwxr-xr-x | setuptools/command/egg_info.py | 4 | ||||
-rwxr-xr-x | setuptools/command/sdist.py | 57 |
2 files changed, 51 insertions, 10 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 2375eb96..3f17c041 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -246,7 +246,8 @@ class manifest_maker(sdist): def add_defaults(self): sdist.add_defaults(self) - self.filelist.extend([self.template,self.manifest]) + self.filelist.append(self.template) + self.filelist.append(self.manifest) rcfiles = list(walk_revctrl()) if rcfiles: self.filelist.extend(rcfiles) @@ -284,7 +285,6 @@ class manifest_maker(sdist): - def write_pkg_info(cmd, basename, filename): log.info("writing %s", filename) if not cmd.dry_run: diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index cdbc5248..41798b60 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -93,26 +93,67 @@ finders = [ ] + + + + + + + + + + + + + + + + + + + + + + + + + + + + class sdist(_sdist): """Smart sdist that finds anything supported by revision control""" + user_options = [ + ('formats=', None, + "formats for source distribution (comma-separated list)"), + ('keep-temp', 'k', + "keep the distribution tree around after creating " + + "archive file(s)"), + ('dist-dir=', 'd', + "directory to put the source distribution archive(s) in " + "[default: dist]"), + ] + + negative_opt = {} + def run(self): self.run_command('egg_info') - _sdist.run(self) + ei_cmd = self.get_finalized_command('egg_info') + self.filelist = ei_cmd.filelist + self.filelist.append(os.path.join(ei_cmd.egg_info,'SOURCES.txt')) + + self.check_metadata() + self.make_distribution() + dist_files = getattr(self.distribution,'dist_files',[]) for file in self.archive_files: data = ('sdist', '', file) if data not in dist_files: dist_files.append(data) - def finalize_options(self): - _sdist.finalize_options(self) - if not os.path.isfile(self.template): - self.force_manifest = 1 # always regen if no template - def add_defaults(self): - _sdist.add_defaults(self) - self.filelist.extend(walk_revctrl()) + |