[Python-checkins] CVS: distutils/distutils/command bdist.py,1.16,1.17 bdist_dumb.py,1.10,1.11

Greg Ward python-dev@python.org
Sun, 10 Sep 2000 17:47:37 -0700


Update of /cvsroot/python/distutils/distutils/command
In directory slayer.i.sourceforge.net:/tmp/cvs-serv27687

Modified Files:
	bdist.py bdist_dumb.py 
Log Message:
Added --plat-name option to override sysconfig.get_platform() in
generated filenames.


Index: bdist.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/bdist.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** bdist.py	2000/08/02 01:44:44	1.16
--- bdist.py	2000/09/11 00:47:35	1.17
***************
*** 33,36 ****
--- 33,39 ----
      user_options = [('bdist-base=', 'b',
                       "temporary directory for creating built distributions"),
+                     ('plat-name=', 'p',
+                      "platform name to embed in generated filenames "
+                      "(default: %s)" % get_platform()),
                      ('formats=', None,
                       "formats for distribution (comma-separated list)"),
***************
*** 71,74 ****
--- 74,78 ----
      def initialize_options (self):
          self.bdist_base = None
+         self.plat_name = None
          self.formats = None
          self.dist_dir = None
***************
*** 78,81 ****
--- 82,89 ----
  
      def finalize_options (self):
+         # have to finalize 'plat_name' before 'bdist_base'
+         if self.plat_name is None:
+             self.plat_name = get_platform()
+ 
          # 'bdist_base' -- parent of per-built-distribution-format
          # temporary directories (eg. we'll probably have
***************
*** 83,88 ****
          if self.bdist_base is None:
              build_base = self.get_finalized_command('build').build_base
!             plat = get_platform()
!             self.bdist_base = os.path.join (build_base, 'bdist.' + plat)
  
          self.ensure_string_list('formats')
--- 91,95 ----
          if self.bdist_base is None:
              build_base = self.get_finalized_command('build').build_base
!             self.bdist_base = os.path.join(build_base, 'bdist.' + self.plat_name)
  
          self.ensure_string_list('formats')

Index: bdist_dumb.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/bdist_dumb.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** bdist_dumb.py	2000/08/05 01:31:54	1.10
--- bdist_dumb.py	2000/09/11 00:47:35	1.11
***************
*** 21,24 ****
--- 21,27 ----
      user_options = [('bdist-dir=', 'd',
                       "temporary directory for creating the distribution"),
+                     ('plat-name=', 'p',
+                      "platform name to embed in generated filenames "
+                      "(default: %s)" % get_platform()),
                      ('format=', 'f',
                       "archive format to create (tar, ztar, gztar, zip)"),
***************
*** 36,39 ****
--- 39,43 ----
      def initialize_options (self):
          self.bdist_dir = None
+         self.plat_name = None
          self.format = None
          self.keep_tree = 0
***************
*** 44,47 ****
--- 48,52 ----
  
      def finalize_options (self):
+ 
          if self.bdist_dir is None:
              bdist_base = self.get_finalized_command('bdist').bdist_base
***************
*** 56,60 ****
                         "on platform %s") % os.name
  
!         self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'))
  
      # finalize_options()
--- 61,67 ----
                         "on platform %s") % os.name
  
!         self.set_undefined_options('bdist',
!                                    ('dist_dir', 'dist_dir'),
!                                    ('plat_name', 'plat_name'))
  
      # finalize_options()
***************
*** 75,79 ****
          # pseudo-installation tree.
          archive_basename = "%s.%s" % (self.distribution.get_fullname(),
!                                       get_platform())
          print "self.bdist_dir = %s" % self.bdist_dir
          print "self.format = %s" % self.format
--- 82,86 ----
          # pseudo-installation tree.
          archive_basename = "%s.%s" % (self.distribution.get_fullname(),
!                                       self.plat_name)
          print "self.bdist_dir = %s" % self.bdist_dir
          print "self.format = %s" % self.format