Przeglądaj źródła

makepanda: pip-install interrogate before setting PYTHONHOME

rdb 1 rok temu
rodzic
commit
8fcaea6e90
2 zmienionych plików z 6 dodań i 1 usunięć
  1. 5 0
      makepanda/makepanda.py
  2. 1 1
      makepanda/makepandacore.py

+ 5 - 0
makepanda/makepanda.py

@@ -560,6 +560,11 @@ if GetHost() == 'windows' and GetTarget() == 'windows':
 else:
     COMPILER = "GCC"
 
+# Ensure we've pip-installed interrogate if we need it before setting
+# PYTHONHOME, etc.
+if not PkgSkip("PYTHON"):
+    GetInterrogate()
+
 SetupBuildEnvironment(COMPILER)
 
 ########################################################################

+ 1 - 1
makepanda/makepandacore.py

@@ -2160,7 +2160,6 @@ def SdkLocatePython(prefer_thirdparty_python=False):
         ver = py_dllver[0] + '.' + py_dllver[1:]
 
         SDK["PYTHONVERSION"] = "python" + ver + abiflags
-        os.environ["PYTHONHOME"] = SDK["PYTHON"]
 
         running_ver = '%d.%d' % sys.version_info[:2]
         if ver != running_ver:
@@ -3090,6 +3089,7 @@ def SetupBuildEnvironment(compiler):
         # extension_native_helpers.py currently expects to find libpandaexpress on sys.path.
         AddToPathEnv("PYTHONPATH", os.path.join(builtdir, "bin"))
         AddToPathEnv("PATH", os.path.join(builtdir, "plugins"))
+        os.environ["PYTHONHOME"] = SDK["PYTHON"]
 
     # Now for the special (DY)LD_LIBRARY_PATH on Unix-esque systems.
     if GetHost() != 'windows':