[go: up one dir, main page]

Menu

[r54]: / trunk / release.py  Maximize  Restore  History

Download this file

32 lines (27 with data), 989 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
Script for creating all of the binaries that are released for the current
platform.
"""
import os
import sys
oracleHomes = os.environ["CX_ORACLE_HOMES"].split(",")
origPath = os.environ["PATH"]
for oracleHome in oracleHomes:
if sys.platform == "win32":
os.environ["PATH"] = oracleHome + os.pathsep + origPath
else:
os.environ["ORACLE_HOME"] = oracleHome
if sys.platform == "win32":
subCommand = "bdist_msi"
subCommandArgs = ""
else:
subCommand = "bdist_rpm"
subCommandArgs = "--no-autoreq --python %s" % sys.executable
command = "%s setup.py %s %s" % \
(sys.executable, subCommand, subCommandArgs)
messageFragment = "%s for home %s" % (subCommand, oracleHome)
sys.stdout.write("Executing %s.\n" % messageFragment)
sys.stdout.write("Running command %s\n" % command)
if os.system(command) != 0:
msg = "Stopping. execution of %s failed.\n" % messageFragment
sys.exit(msg)