Allow 2.0 on the list of target versions. NB. this isn't enough: the GUI part,

misc/install.c, still needs to be updated, and it looks like a non-trivial
change.
This commit is contained in:
Greg Ward 2000-06-29 23:50:19 +00:00
parent 29c08beab0
commit 5d6ae76c09

View File

@ -27,7 +27,7 @@ class bdist_wininst (Command):
"compile to .pyo on the target system"), "compile to .pyo on the target system"),
('target-version=', 'v', ('target-version=', 'v',
"require a specific python version" + "require a specific python version" +
" on the target system (1.5 or 1.6)"), " on the target system (1.5 or 1.6/2.0)"),
] ]
def initialize_options (self): def initialize_options (self):
@ -47,9 +47,9 @@ class bdist_wininst (Command):
if not self.target_version: if not self.target_version:
self.target_version = "" self.target_version = ""
else: else:
if not self.target_version in ("1.5", "1.6"): if not self.target_version in ("1.5", "1.6", "2.0"):
raise DistutilsOptionError ( raise DistutilsOptionError (
"target version must be 1.5 or 1.6") "target version must be 1.5, 1.6, or 2.0")
if self.distribution.has_ext_modules(): if self.distribution.has_ext_modules():
short_version = sys.version[:3] short_version = sys.version[:3]
if self.target_version and self.target_version != short_version: if self.target_version and self.target_version != short_version:
@ -74,8 +74,8 @@ class bdist_wininst (Command):
# The packager can choose if .pyc and .pyo files should be created # The packager can choose if .pyc and .pyo files should be created
# on the TARGET system instead at the SOURCE system. # on the TARGET system instead at the SOURCE system.
## # The compilation can only be done on the SOURCE system ## # The compilation can only be done on the SOURCE system for one
## # for one python version (assuming 1.6 and 1.5 have incompatible ## # python version (assuming 1.6/2.0 and 1.5 have incompatible
## # byte-codes). ## # byte-codes).
## short_version = sys.version[:3] ## short_version = sys.version[:3]
## if self.target_version == short_version: ## if self.target_version == short_version: