@@ -20,6 +20,9 @@ class bdist_dumb (Command):
2020
2121 user_options = [('bdist-dir=' , 'd' ,
2222 "temporary directory for creating the distribution" ),
23+ ('plat-name=' , 'p' ,
24+ "platform name to embed in generated filenames "
25+ "(default: %s)" % get_platform ()),
2326 ('format=' , 'f' ,
2427 "archive format to create (tar, ztar, gztar, zip)" ),
2528 ('keep-tree' , 'k' ,
@@ -35,6 +38,7 @@ class bdist_dumb (Command):
3538
3639 def initialize_options (self ):
3740 self .bdist_dir = None
41+ self .plat_name = None
3842 self .format = None
3943 self .keep_tree = 0
4044 self .dist_dir = None
@@ -43,6 +47,7 @@ def initialize_options (self):
4347
4448
4549 def finalize_options (self ):
50+
4651 if self .bdist_dir is None :
4752 bdist_base = self .get_finalized_command ('bdist' ).bdist_base
4853 self .bdist_dir = os .path .join (bdist_base , 'dumb' )
@@ -55,7 +60,9 @@ def finalize_options (self):
5560 ("don't know how to create dumb built distributions " +
5661 "on platform %s" ) % os .name
5762
58- self .set_undefined_options ('bdist' , ('dist_dir' , 'dist_dir' ))
63+ self .set_undefined_options ('bdist' ,
64+ ('dist_dir' , 'dist_dir' ),
65+ ('plat_name' , 'plat_name' ))
5966
6067 # finalize_options()
6168
@@ -74,7 +81,7 @@ def run (self):
7481 # And make an archive relative to the root of the
7582 # pseudo-installation tree.
7683 archive_basename = "%s.%s" % (self .distribution .get_fullname (),
77- get_platform () )
84+ self . plat_name )
7885 print "self.bdist_dir = %s" % self .bdist_dir
7986 print "self.format = %s" % self .format
8087 self .make_archive (os .path .join (self .dist_dir , archive_basename ),
0 commit comments