[Python-checkins] CVS: python/dist/src/Lib/distutils dist.py,1.47,1.48

A.M. Kuchling akuchling@users.sourceforge.net
2001年8月10日 11:49:25 -0700


Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv1945
Modified Files:
	dist.py 
Log Message:
[Bug #412271, bug #449009] Use 'license' as the attribute name, 
 though 'licence' is still supported for backward-compatibility
 (Should I add a warning to get_licence(), or not bother?)
Index: dist.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/dist.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** dist.py	2001年03月31日 02:41:01	1.47
--- dist.py	2001年08月10日 18:49:23	1.48
***************
*** 14,18 ****
 from copy import copy
 from distutils.errors import *
- from distutils import sysconfig
 from distutils.fancy_getopt import FancyGetopt, translate_longopt
 from distutils.util import check_environ, strtobool, rfc822_escape
--- 14,17 ----
***************
*** 78,85 ****
 ('url', None,
 "print the URL for this package"),
- ('licence', None,
- "print the licence of the package"),
 ('license', None,
! "alias for --licence"),
 ('description', None,
 "print the package description"),
--- 77,84 ----
 ('url', None,
 "print the URL for this package"),
 ('license', None,
! "print the license of the package"),
! ('licence', None,
! "alias for --license"),
 ('description', None,
 "print the package description"),
***************
*** 396,400 ****
 parser = FancyGetopt(self.global_options + self.display_options)
 parser.set_negative_aliases(self.negative_opt)
! parser.set_aliases({'license': 'licence'})
 args = parser.getopt(args=self.script_args, object=self)
 option_order = parser.get_option_order()
--- 395,399 ----
 parser = FancyGetopt(self.global_options + self.display_options)
 parser.set_negative_aliases(self.negative_opt)
! parser.set_aliases({'licence': 'license'})
 args = parser.getopt(args=self.script_args, object=self)
 option_order = parser.get_option_order()
***************
*** 581,585 ****
 
 for command in self.commands:
! if type(command) is ClassType and issubclass(klass, Command):
 klass = command
 else:
--- 580,584 ----
 
 for command in self.commands:
! if type(command) is ClassType and issubclass(command, Command):
 klass = command
 else:
***************
*** 972,976 ****
 self.maintainer_email = None
 self.url = None
! self.licence = None
 self.description = None
 self.long_description = None
--- 971,975 ----
 self.maintainer_email = None
 self.url = None
! self.license = None
 self.description = None
 self.long_description = None
***************
*** 991,995 ****
 pkg_info.write('Author: %s\n' % self.get_contact() )
 pkg_info.write('Author-email: %s\n' % self.get_contact_email() )
! pkg_info.write('License: %s\n' % self.get_licence() )
 
 long_desc = rfc822_escape( self.get_long_description() )
--- 990,994 ----
 pkg_info.write('Author: %s\n' % self.get_contact() )
 pkg_info.write('Author-email: %s\n' % self.get_contact_email() )
! pkg_info.write('License: %s\n' % self.get_license() )
 
 long_desc = rfc822_escape( self.get_long_description() )
***************
*** 1043,1049 ****
 return self.url or "UNKNOWN"
 
! def get_licence(self):
! return self.licence or "UNKNOWN"
! 
 def get_description(self):
 return self.description or "UNKNOWN"
--- 1042,1049 ----
 return self.url or "UNKNOWN"
 
! def get_license(self):
! return self.license or "UNKNOWN"
! get_licence = get_license
! 
 def get_description(self):
 return self.description or "UNKNOWN"

AltStyle によって変換されたページ (->オリジナル) /