diff options
author | Andrew Kuchling <amk@amk.ca> | 2013-11-15 18:01:52 (GMT) |
---|---|---|
committer | Andrew Kuchling <amk@amk.ca> | 2013-11-15 18:01:52 (GMT) |
commit | 5e2d45672c8f84f6b1877e68ab92b4b50e2d124d (patch) | |
tree | acccecbfdceb5560510b1b989b44a34c65822f7d /Lib/distutils/command/sdist.py | |
parent | c31ebb60f975b231e8f2fff7af72204bf3309ed0 (diff) | |
download | cpython-5e2d45672c8f84f6b1877e68ab92b4b50e2d124d.zip cpython-5e2d45672c8f84f6b1877e68ab92b4b50e2d124d.tar.gz cpython-5e2d45672c8f84f6b1877e68ab92b4b50e2d124d.tar.bz2 |
Issue #19544 and Issue #6516: Restore support for --user and --group parameters to sdist command as found in Python 2.7 and originally slated for Python 3.2 but accidentally rolled back as part of the distutils2 rollback. Closes Issue #6516.
Diffstat (limited to 'Lib/distutils/command/sdist.py')
-rw-r--r-- | Lib/distutils/command/sdist.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py index 116f67e..7ea3d5f 100644 --- a/Lib/distutils/command/sdist.py +++ b/Lib/distutils/command/sdist.py @@ -74,6 +74,10 @@ class sdist(Command): ('metadata-check', None, "Ensure that all required elements of meta-data " "are supplied. Warn if any missing. [default]"), + ('owner=', 'u', + "Owner name used when creating a tar file [default: current user]"), + ('group=', 'g', + "Group name used when creating a tar file [default: current group]"), ] boolean_options = ['use-defaults', 'prune', @@ -113,6 +117,8 @@ class sdist(Command): self.archive_files = None self.metadata_check = 1 + self.owner = None + self.group = None def finalize_options(self): if self.manifest is None: @@ -444,7 +450,8 @@ class sdist(Command): self.formats.append(self.formats.pop(self.formats.index('tar'))) for fmt in self.formats: - file = self.make_archive(base_name, fmt, base_dir=base_dir) + file = self.make_archive(base_name, fmt, base_dir=base_dir, + owner=self.owner, group=self.group) archive_files.append(file) self.distribution.dist_files.append(('sdist', '', file)) |