Fix build so that there is no need to specify the python version within the

source RPM as requested.
This commit is contained in:
Anthony Tuininga 2012-06-30 23:22:14 -06:00
parent 6ceb861f76
commit c7ca9e22b6

View File

@ -14,12 +14,21 @@ origPath = os.environ["PATH"]
for version in pythonVersions:
majorVersion, minorVersion = [int(s) for s in version.split(".")]
python = pythonFormat % (majorVersion, minorVersion)
if sys.platform != "win32":
linkNames = ["python"]
if majorVersion == 3:
linkNames.append("python3")
for linkName in linkNames:
basePython = os.path.join(os.path.dirname(python), linkName)
if os.path.exists(basePython):
os.unlink(basePython)
os.link(python, basePython)
for oracleHome in oracleHomes:
if sys.platform == "win32":
os.environ["PATH"] = oracleHome + os.pathsep + origPath
else:
os.environ["ORACLE_HOME"] = oracleHome
python = pythonFormat % (majorVersion, minorVersion)
if testMode:
subCommand = "test"
subCommandArgs = ""
@ -31,7 +40,7 @@ for version in pythonVersions:
subCommand = "bdist_msi"
else:
subCommand = "bdist_rpm"
subCommandArgs = "--no-autoreq --python %s" % python
subCommandArgs = "--no-autoreq"
command = "%s setup.py %s %s" % \
(python, subCommand, subCommandArgs)
messageFragment = "%s for Python %s.%s in home %s" % \