[Python-checkins] CVS: distutils/distutils/command bdist.py,1.11,1.12 build.py,1.23,1.24 build_clib.py,1.16,1.17 sdist.py,1.33,1.34

Greg Ward python-dev@python.org
Fri, 23 Jun 2000 17:23:22 -0700


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

Modified Files:
	bdist.py build.py build_clib.py sdist.py 
Log Message:
Stylistic/formatting changes to Rene Liebscher's '--help-xxx' patch.

Index: bdist.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/bdist.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** bdist.py	2000/06/07 03:00:06	1.11
--- bdist.py	2000/06/24 00:23:20	1.12
***************
*** 22,26 ****
                       "temporary directory for creating built distributions"),
                      ('formats=', None,
!                      "formats for distribution"),
                     ]
  
--- 22,26 ----
                       "temporary directory for creating built distributions"),
                      ('formats=', None,
!                      "formats for distribution (comma-separated list)"),
                     ]
  
***************
*** 33,52 ****
                         'nt': 'zip', }
  
!     format_command = { 'gztar': ('bdist_dumb',"gzipped tar-file"),
!                        'bztar': ('bdist_dumb',"bzip2-ed tar-file"),
!                        'ztar':  ('bdist_dumb',"compressed tar-file"),
!                        'tar':   ('bdist_dumb',"tar-file"),
!                        'rpm':   ('bdist_rpm',"rpm distribution"),
!                        'zip':   ('bdist_dumb',"zip-file"),
  		        }
  
!     # prints all possible arguments to --format
!     def show_formats():
  	from distutils.fancy_getopt import FancyGetopt 
! 	list_of_formats=[]
  	for format in bdist.format_command.keys():
! 	    list_of_formats.append(("formats="+format,None,bdist.format_command[format][1]))
! 	list_of_formats.sort()
! 	pretty_printer=FancyGetopt(list_of_formats)
  	pretty_printer.print_help("List of available distribution formats:")
  
--- 33,54 ----
                         'nt': 'zip', }
  
!     format_command = { 'rpm':   ('bdist_rpm',  "RPM distribution"),
!                        'gztar': ('bdist_dumb', "gzip'ed tar file"),
!                        'bztar': ('bdist_dumb', "bzip2'ed tar file"),
!                        'ztar':  ('bdist_dumb', "compressed tar file"),
!                        'tar':   ('bdist_dumb', "tar file"),
!                        'zip':   ('bdist_dumb', "ZIP file"),
  		        }
  
!     def show_formats ():
!         """Print list of available formats (arguments to "--format" option).
!         """
  	from distutils.fancy_getopt import FancyGetopt 
! 	formats=[]
  	for format in bdist.format_command.keys():
! 	    formats.append(("formats="+format, None,
!                             bdist.format_command[format][1]))
! 	formats.sort()
! 	pretty_printer = FancyGetopt(formats)
  	pretty_printer.print_help("List of available distribution formats:")
  
***************
*** 88,92 ****
  
          for format in self.formats:
- 
              try:
                  cmd_name = self.format_command[format][0]
--- 90,93 ----

Index: build.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/build.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** build.py	2000/06/07 03:00:06	1.23
--- build.py	2000/06/24 00:23:20	1.24
***************
*** 37,43 ****
           "forcibly build everything (ignore file timestamps)"),
          ]
      help_options = [
          ('help-compiler', None,
!          "lists available compilers",show_compilers),
  	]
  
--- 37,44 ----
           "forcibly build everything (ignore file timestamps)"),
          ]
+ 
      help_options = [
          ('help-compiler', None,
!          "list available compilers", show_compilers),
  	]
  

Index: build_clib.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/build_clib.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** build_clib.py	2000/06/07 03:00:06	1.16
--- build_clib.py	2000/06/24 00:23:20	1.17
***************
*** 43,49 ****
           "specify the compiler type"),
          ]
      help_options = [
          ('help-compiler', None,
!          "lists available compilers",show_compilers),
  	]
  
--- 43,50 ----
           "specify the compiler type"),
          ]
+ 
      help_options = [
          ('help-compiler', None,
!          "list available compilers", show_compilers),
  	]
  

Index: sdist.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** sdist.py	2000/06/21 03:29:57	1.33
--- sdist.py	2000/06/24 00:23:20	1.34
***************
*** 37,41 ****
           "forcibly regenerate the manifest and carry on as usual"),
          ('formats=', None,
!          "formats for source distribution"),
          ('keep-tree', 'k',
           "keep the distribution tree around after creating " +
--- 37,41 ----
           "forcibly regenerate the manifest and carry on as usual"),
          ('formats=', None,
!          "formats for source distribution (comma-separated list)"),
          ('keep-tree', 'k',
           "keep the distribution tree around after creating " +
***************
*** 62,66 ****
      help_options = [
          ('help-formats', None,
!          "lists available distribution formats", show_formats),
  	]
  
--- 62,66 ----
      help_options = [
          ('help-formats', None,
!          "list available distribution formats", show_formats),
  	]