aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts
diff options
context:
space:
mode:
authorSimo Fält <simo.falt@qt.io>2018-05-16 10:50:52 +0300
committerSimo Fält <simo.falt@qt.io>2018-05-17 09:28:04 +0000
commit0c83e2408b81ec62e8eb787b01518ccb46236fc4 (patch)
treec59d8306abc5f4899674694a72f91913ca12d811 /build_scripts
parent6033f4a3425268b8c4aa1f61f7bd8b247a1ff380 (diff)
Select correct Python environment when cross compiling
To be able to create 32 bit wheel in 64 bit Windows, we must use correct Python version. Task-number: PYSIDE-646 Change-Id: I72c05e9c5b6f37f16c118e36c3c7ea8f90ee7dff Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'build_scripts')
-rw-r--r--build_scripts/utils.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/build_scripts/utils.py b/build_scripts/utils.py
index 8ce1b8a51..2dffd345c 100644
--- a/build_scripts/utils.py
+++ b/build_scripts/utils.py
@@ -1086,16 +1086,24 @@ def install_pip_dependencies(env_pip, packages):
for p in packages:
run_instruction([env_pip, "install", p], "Failed to install " + p)
-def get_qtci_virtualEnv(python_ver, host):
+def get_qtci_virtualEnv(python_ver, host, hostArch, targetArch):
_pExe = "python"
_env = "env" + str(python_ver)
env_python = _env + "/bin/python"
env_pip = _env + "/bin/pip"
if host == "Windows":
+ print("New virtualenv to build " + targetArch + " in " + hostArch + " host.")
_pExe = "python.exe"
- if python_ver == "3":
- _pExe = os.path.join(os.getenv("PYTHON3_PATH"), "python.exe")
+ # With windows we are creating building 32-bit target in 64-bit host
+ if hostArch == "X86_64" and targetArch == "X86":
+ if python_ver == "3":
+ _pExe = os.path.join(os.getenv("PYTHON3_32_PATH"), "python.exe")
+ else:
+ _pExe = os.path.join(os.getenv("PYTHON2_32_PATH"), "python.exe")
+ else:
+ if python_ver == "3":
+ _pExe = os.path.join(os.getenv("PYTHON3_PATH"), "python.exe")
env_python = _env + "\\Scripts\\python.exe"
env_pip = _env + "\\Scripts\\pip.exe"
else: