Details
Description
When creating a virtualenv on Windows (and possibly other platforms) the wrong path is being detected for python libraries. This results in failed build due to python37.lib.
From my commands here and the provided output (also see attached shiboken_build.txt file), it is showing that the detected python environment improperly populates PYTHON_LIBRARIES with the buildenv path (but the python37.lib is in the system python install not the virtualenv). This is causing the subsequent build failure (see below).
Setup/Command execution
C:\Users\mtmcp\Documents\pyside-setup>virtualenv buildenv
created virtual environment in 625ms CPython3Windows(dest=C:\Users\mtmcp\Documents\pyside-setup\buildenv, clear=False, global=False) with seeder FromAppData pip=latest setuptools=latest wheel=latest app_data_dir=C:\Users\mtmcp\AppData\Local\pypa\virtualenv\seed-v1 via=copyC:\Users\mtmcp\Documents\pyside-setup>call buildenv\Scripts\activateC:\Users\mtmcp\Documents\pyside-setup>python setup.py install --build-type=shiboken2-generator --cmake="C:
Program Files\\CMake\\bin
cmake.exe" --qmake="D:\\Qt\\5.14.1\\msvc2017\\bin
qmake.exe" --verbose-build 2>&1 > shiboken_build.txt
PYTHON_ARCH: 32
PYTHONLIBS_FOUND: TRUE
PYTHON_LIBRARIES: C:/Users/mtmcp/Documents/pyside-setup/buildenv/libs/python37.lib
PYTHON_INCLUDE_DIRS: C:/Program Files (x86)/Python37-32/include
PYTHON_DEBUG_LIBRARIES: PYTHON_DEBUG_LIBRARY-NOTFOUND
PYTHONINTERP_FOUND: TRUE
PYTHON_EXECUTABLE: C:/Users/mtmcp/Documents/pyside-setup/buildenv/Scripts/python.exe
PYTHON_VERSION: 3.7.6
PYTHON_EXTENSION_SUFFIX: .cp37-win32
Build Errors
NMAKE : fatal error U1073: don't know how to make 'C:\Users\mtmcp\Documents\pyside-setup\buildenv\libs\python37.lib'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
error: Error compiling shiboken2
Traceback (most recent call last):
{{ File "setup.py", line 296, in <module>}}
{{ setup_runner.run_setup()}}
{{ File "C:\Users\mtmcp\Documents\pyside-setup\build_scripts\setup_runner.py", line 158, in run_setup}}
{{ raise RuntimeError(msg)}}
RuntimeError:
setup.py invocation failed with exit code: 1.
setup.py invocation was: C:\Users\mtmcp\Documents\pyside-setup\buildenv\Scripts\python.exe setup.py install --build-type=shiboken2-generator --cmake=C:
Program Files\\CMake\\bin
cmake.exe --qmake=D:\\Qt\\5.14.1\\msvc2017\\bin
qmake.exe --verbose-build --internal-build-type=shiboken2-generator
Attachments
For Gerrit Dashboard: PYSIDE-1231 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
290870,9 | shiboken: Improve the libdir for windows | 5.14 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
291125,5 | shiboken: Improve the libdir for windows | 5.12 | pyside/pyside-setup | Status: MERGED | +2 | 0 |