diff options
author | PJ Eby <distutils-sig@python.org> | 2005-11-18 03:45:16 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-11-18 03:45:16 +0000 |
commit | f3694a0388e4e15d9cbdd84e4c8ca7817c87a52c (patch) | |
tree | d72ca4fc258a4c7730758d84bc26fcf2a36a5a28 /setuptools/command/sdist.py | |
parent | 873ebe91a8de43df836c873d9106e5af31c302e4 (diff) | |
download | external_python_setuptools-f3694a0388e4e15d9cbdd84e4c8ca7817c87a52c.tar.gz external_python_setuptools-f3694a0388e4e15d9cbdd84e4c8ca7817c87a52c.tar.bz2 external_python_setuptools-f3694a0388e4e15d9cbdd84e4c8ca7817c87a52c.zip |
The ``sdist`` command no longer uses the traditional ``MANIFEST`` file to
create source distributions. ``MANIFEST.in`` is still read and processed,
as are the standard defaults and pruning. But the manifest is built inside
the project's ``.egg-info`` directory as ``SOURCES.txt``, and it is rebuilt
every time the ``egg_info`` command is run.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041472
Diffstat (limited to 'setuptools/command/sdist.py')
-rwxr-xr-x | setuptools/command/sdist.py | 57 |
1 files changed, 49 insertions, 8 deletions
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()) + |