[Python-checkins] CVS: distutils/distutils/command sdist.py,1.26,1.27
Greg Ward
python-dev@python.org
Wed, 7 Jun 2000 17:14:20 -0700
Update of /cvsroot/python/distutils/distutils/command
In directory slayer.i.sourceforge.net:/tmp/cvs-serv16257
Modified Files:
sdist.py
Log Message:
Cosmetic tweaks to imports, the 'show_formats()' function, and the
'help_options' list; also added an editorial comment.
Index: sdist.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** sdist.py 2000/06/08 00:08:14 1.26
--- sdist.py 2000/06/08 00:14:18 1.27
***************
*** 5,9 ****
# created 1999/09/22, Greg Ward
! __revision__ = "$Id: sdist.py,v 1.26 2000/06/08 00:08:14 gward Exp $"
import sys, os, string, re
--- 5,9 ----
# created 1999/09/22, Greg Ward
! __revision__ = "$Id: sdist.py,v 1.27 2000/06/08 00:14:18 gward Exp $"
import sys, os, string, re
***************
*** 12,18 ****
from glob import glob
from distutils.core import Command
! from distutils.util import newer, create_tree, remove_tree, convert_path, \
! write_file
! from distutils.archive_util import check_archive_formats,ARCHIVE_FORMATS
from distutils.text_file import TextFile
from distutils.errors import DistutilsExecError, DistutilsOptionError
--- 12,18 ----
from glob import glob
from distutils.core import Command
! from distutils.util import \
! convert_path, create_tree, remove_tree, newer, write_file, \
! check_archive_formats, ARCHIVE_FORMATS
from distutils.text_file import TextFile
from distutils.errors import DistutilsExecError, DistutilsOptionError
***************
*** 41,57 ****
"archive file(s)"),
]
! # prints all possible arguments to --formats
! def show_formats():
from distutils.fancy_getopt import FancyGetopt
! list_of_formats=[]
for format in ARCHIVE_FORMATS.keys():
! list_of_formats.append(("formats="+format,None,ARCHIVE_FORMATS[format][2]))
! list_of_formats.sort()
! pretty_printer=FancyGetopt(list_of_formats)
! pretty_printer.print_help("List of available distribution formats:")
help_options = [
('help-formats', None,
! "lists available distribution formats",show_formats),
]
--- 41,65 ----
"archive file(s)"),
]
!
!
! # XXX ugh: this has to precede the 'help_options' list, because
! # it is mentioned there -- also, this is not a method, even though
! # it's defined in a class: double-ugh!
! def show_formats ():
! """Print all possible values for the 'formats' option -- used by
! the "--help-formats" command-line option.
! """
from distutils.fancy_getopt import FancyGetopt
! formats=[]
for format in ARCHIVE_FORMATS.keys():
! formats.append(("formats="+format,None,ARCHIVE_FORMATS[format][2]))
! formats.sort()
! pretty_printer = FancyGetopt(formats)
! pretty_printer.print_help(
! "List of available source distribution formats:")
help_options = [
('help-formats', None,
! "lists available distribution formats", show_formats),
]