diff options
| author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-10-02 23:49:48 (GMT) |
|---|---|---|
| committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-10-02 23:49:48 (GMT) |
| commit | 1b48671ef11a635fc452e35d08c14a601baa1db7 (patch) | |
| tree | bf4bb45c8d7382e89a8f0973afa3bf6db9ea5e9c /Lib/distutils/command/bdist.py | |
| parent | 12fafe69367b49421e53da513cc7c470e1219fdd (diff) | |
| download | cpython-1b48671ef11a635fc452e35d08c14a601baa1db7.zip cpython-1b48671ef11a635fc452e35d08c14a601baa1db7.tar.gz cpython-1b48671ef11a635fc452e35d08c14a601baa1db7.tar.bz2 | |
#6516 added owner/group support for tarfiles in Distutils
Diffstat (limited to 'Lib/distutils/command/bdist.py')
| -rw-r--r-- | Lib/distutils/command/bdist.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/distutils/command/bdist.py b/Lib/distutils/command/bdist.py index ec3375e..8e0ad08 100644 --- a/Lib/distutils/command/bdist.py +++ b/Lib/distutils/command/bdist.py @@ -40,6 +40,12 @@ class bdist(Command): "[default: dist]"), ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), + ('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 = ['skip-build'] @@ -81,6 +87,8 @@ class bdist(Command): self.formats = None self.dist_dir = None self.skip_build = 0 + self.group = None + self.owner = None def finalize_options(self): # have to finalize 'plat_name' before 'bdist_base' @@ -126,6 +134,11 @@ class bdist(Command): if cmd_name not in self.no_format_option: sub_cmd.format = self.formats[i] + # passing the owner and group names for tar archiving + if cmd_name == 'bdist_dumb': + sub_cmd.owner = self.owner + sub_cmd.group = self.group + # If we're going to need to run this command again, tell it to # keep its temporary files around so subsequent runs go faster. if cmd_name in commands[i+1:]: |
