Building from source¶
This step is focused on building Shiboken from source, both the Generator and Python module. Please notice that these are built when you are building PySide from source too, so there is no need to continue if you already have a built PySide.
Python: 3.5+ and 2.7
Qt: 5.12+ is recommended
libclang: The libclang library, recommended: version 6 for Shiboken2 5.12. Prebuilt versions of it can be downloaded here.
CMake: 3.1+ is needed.
If you need only Shiboken Generator, a simple build run would look like this:
python setup.py install --qmake=/path/to/qmake \ --build-tests \ --parallel=8 \ --verbose-build \ --internal-build-type=shiboken2-generator
The same can be used for the module, changing the value of
Using the wheels¶
shiboken2 from pip does not install
because the wheels are not on PyPi.
You can get the
shiboken2_generator wheels from Qt servers, and you can still install it
pip install \ --index-url=http://download.qt.io/official_releases/QtForPython/ \ --trusted-host download.qt.io \ shiboken2 pyside2 shiboken2_generator
whl package cannot automatically discover in your system the location for:
qmakelocation with the same version as the one described in the wheel,
Qt libraries with the same package version.
So using this process requires you to manually modify the variables:
CLANG_INSTALL_DIRmust be set to where the libraries are,
PATHmust include the location for a
qmakewith the same Qt version as the package,
LD_LIBRARY_PATHincluding the Qt libraries and Clang libraries paths.
© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.