Kaydet (Commit) c4eb84ac authored tarafından Greg Ward's avatar Greg Ward

Added --dist-dir option to control where output archive(s) go.

üst 040dc0b6
...@@ -24,6 +24,8 @@ class bdist_dumb (Command): ...@@ -24,6 +24,8 @@ class bdist_dumb (Command):
('keep-tree', 'k', ('keep-tree', 'k',
"keep the pseudo-installation tree around after " + "keep the pseudo-installation tree around after " +
"creating the distribution archive"), "creating the distribution archive"),
('dist-dir=', 'd',
"directory to put final built distributions in"),
] ]
default_format = { 'posix': 'gztar', default_format = { 'posix': 'gztar',
...@@ -34,6 +36,7 @@ class bdist_dumb (Command): ...@@ -34,6 +36,7 @@ class bdist_dumb (Command):
self.bdist_dir = None self.bdist_dir = None
self.format = None self.format = None
self.keep_tree = 0 self.keep_tree = 0
self.dist_dir = None
# initialize_options() # initialize_options()
...@@ -51,6 +54,8 @@ class bdist_dumb (Command): ...@@ -51,6 +54,8 @@ class bdist_dumb (Command):
("don't know how to create dumb built distributions " + ("don't know how to create dumb built distributions " +
"on platform %s") % os.name "on platform %s") % os.name
self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'))
# finalize_options() # finalize_options()
...@@ -71,7 +76,8 @@ class bdist_dumb (Command): ...@@ -71,7 +76,8 @@ class bdist_dumb (Command):
get_platform()) get_platform())
print "self.bdist_dir = %s" % self.bdist_dir print "self.bdist_dir = %s" % self.bdist_dir
print "self.format = %s" % self.format print "self.format = %s" % self.format
self.make_archive (archive_basename, self.format, self.make_archive (os.path.join(self.dist_dir, archive_basename),
self.format,
root_dir=self.bdist_dir) root_dir=self.bdist_dir)
if not self.keep_tree: if not self.keep_tree:
......
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