mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
fix for Python versions before 2.6
This commit is contained in:
parent
ad3706e6f1
commit
e38b97b26f
@ -1641,7 +1641,11 @@ def RunGenPyCode(target, inputs, opts):
|
|||||||
if (PkgSkip("PYTHON") != 0):
|
if (PkgSkip("PYTHON") != 0):
|
||||||
return
|
return
|
||||||
|
|
||||||
cmdstr = sys.executable + " -B " + os.path.join(GetOutputDir(), "direct", "ffi", "jGenPyCode.py")
|
cmdstr = sys.executable + " "
|
||||||
|
if sys.version_info >= (2, 6):
|
||||||
|
cmdstr += "-B "
|
||||||
|
|
||||||
|
cmdstr += os.path.join(GetOutputDir(), "direct", "ffi", "jGenPyCode.py")
|
||||||
if (GENMAN): cmdstr += " -d"
|
if (GENMAN): cmdstr += " -d"
|
||||||
cmdstr += " -r"
|
cmdstr += " -r"
|
||||||
for i in inputs:
|
for i in inputs:
|
||||||
@ -1661,7 +1665,11 @@ def RunGenPyCode(target, inputs, opts):
|
|||||||
def FreezePy(target, inputs, opts):
|
def FreezePy(target, inputs, opts):
|
||||||
assert len(inputs) > 0
|
assert len(inputs) > 0
|
||||||
# Make sure this function isn't called before genpycode is run.
|
# Make sure this function isn't called before genpycode is run.
|
||||||
cmdstr = sys.executable + " -B " + os.path.join("direct", "src", "showutil", "pfreeze.py")
|
cmdstr = sys.executable + " "
|
||||||
|
if sys.version_info >= (2, 6):
|
||||||
|
cmdstr += "-B "
|
||||||
|
|
||||||
|
cmdstr += os.path.join("direct", "src", "showutil", "pfreeze.py")
|
||||||
src = inputs.pop(0)
|
src = inputs.pop(0)
|
||||||
for i in inputs:
|
for i in inputs:
|
||||||
cmdstr += " -i " + os.path.splitext(i)[0]
|
cmdstr += " -i " + os.path.splitext(i)[0]
|
||||||
@ -1685,10 +1693,14 @@ def FreezePy(target, inputs, opts):
|
|||||||
def Package(target, inputs, opts):
|
def Package(target, inputs, opts):
|
||||||
assert len(inputs) == 1
|
assert len(inputs) == 1
|
||||||
# Invoke the ppackage script.
|
# Invoke the ppackage script.
|
||||||
command = sys.executable
|
command = sys.executable + " "
|
||||||
if (GetOptimizeOption(opts) >= 4):
|
if GetOptimizeOption(opts) >= 4:
|
||||||
command += " -OO"
|
command += "-OO "
|
||||||
command += " -B direct/src/p3d/ppackage.py"
|
|
||||||
|
if sys.version_info >= (2, 6):
|
||||||
|
command += "-B "
|
||||||
|
|
||||||
|
command += "direct/src/p3d/ppackage.py"
|
||||||
|
|
||||||
if GetTarget() == "darwin":
|
if GetTarget() == "darwin":
|
||||||
if SDK.get("MACOSX") is not None:
|
if SDK.get("MACOSX") is not None:
|
||||||
@ -6321,7 +6333,12 @@ def MakeInstallerOSX():
|
|||||||
if (RUNTIME):
|
if (RUNTIME):
|
||||||
# Invoke the make_installer script.
|
# Invoke the make_installer script.
|
||||||
AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins")
|
AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins")
|
||||||
oscmd(sys.executable + " -B direct/src/plugin_installer/make_installer.py --version %s" % VERSION)
|
cmdstr = sys.executable + " "
|
||||||
|
if sys.version_info >= (2, 6):
|
||||||
|
cmdstr += "-B "
|
||||||
|
|
||||||
|
cmdstr += "direct/src/plugin_installer/make_installer.py --version %s" % VERSION
|
||||||
|
oscmd(cmdstr)
|
||||||
return
|
return
|
||||||
|
|
||||||
import compileall
|
import compileall
|
||||||
|
Loading…
x
Reference in New Issue
Block a user