Ensure that in Python 2.3 and 2.4 the bdist_wininst command renames the target
as well as in Python 2.5.
This commit is contained in:
parent
2c07de41fd
commit
c60c1fdf69
25
setup.py
25
setup.py
@ -10,8 +10,9 @@ Unix platforms
|
||||
|
||||
import sys
|
||||
|
||||
if sys.platform == "win32" and sys.version_info[:2] >= (2, 5):
|
||||
import distutils.command.bdist_msi
|
||||
if sys.platform == "win32":
|
||||
if sys.version_info[:2] >= (2, 5):
|
||||
import distutils.command.bdist_msi
|
||||
import distutils.command.bdist_wininst
|
||||
import distutils.command.bdist_rpm
|
||||
import distutils.command.build
|
||||
@ -219,18 +220,20 @@ class build(distutils.command.build.build):
|
||||
commandClasses = dict(build = build, bdist_rpm = bdist_rpm)
|
||||
|
||||
# tweak the Windows installer names to include the Oracle version
|
||||
if sys.platform == "win32" and sys.version_info[:2] >= (2, 5):
|
||||
if sys.platform == "win32":
|
||||
|
||||
if sys.version_info[:2] >= (2, 5):
|
||||
|
||||
class bdist_msi(distutils.command.bdist_msi.bdist_msi):
|
||||
class bdist_msi(distutils.command.bdist_msi.bdist_msi):
|
||||
|
||||
def run(self):
|
||||
origMethod = self.distribution.get_fullname
|
||||
self.distribution.get_fullname = \
|
||||
self.distribution.get_fullname_with_oracle_version
|
||||
distutils.command.bdist_msi.bdist_msi.run(self)
|
||||
self.distribution.get_fullname = origMethod
|
||||
def run(self):
|
||||
origMethod = self.distribution.get_fullname
|
||||
self.distribution.get_fullname = \
|
||||
self.distribution.get_fullname_with_oracle_version
|
||||
distutils.command.bdist_msi.bdist_msi.run(self)
|
||||
self.distribution.get_fullname = origMethod
|
||||
|
||||
commandClasses["bdist_msi"] = bdist_msi
|
||||
commandClasses["bdist_msi"] = bdist_msi
|
||||
|
||||
class bdist_wininst(distutils.command.bdist_wininst.bdist_wininst):
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user