Building PySide
PySide is a collection of four interdependent packages, namely API Extractor, Generator Runner, Shiboken Generator, and Pyside Qt bindings. In order to build PySide, you have to download and install these packages in that order:
- API Extractor: This is a set of libraries that is used by the binding generator to parse the header and type system files to create an internal representation of the API [https://distfiles.macports.org/apiextractor/].
- Generator Runner: This is the program that controls the bindings generation process according to the rules given by the user through headers, type system files, and generator frontends. It is dependent on the API Extractor [https://distfiles.macports.org/generatorrunner/].
- Shiboken Generator: This is the plugin that creates the PySide bindings source files from Qt headers and auxiliary files (type systems, global.h, and glue files). It is dependent on Generator Runner and API Extractor [https://distfiles.macports.org/py-shiboken/].
- PySide Qt Bindings: This is a set of type system definitions and glue codes that allows generation of Python Qt binding modules using the PySide tool chain. It is dependent on Shiboken and Generator Runner [https://distfiles.macports.org/py-pyside/].
Always, make sure that you have downloaded and built these packages in this order because each of these packages is interdependent. The build steps for each of these are:
- Unzip the downloaded packages and change into the package directory:
tar –xvf <package_name> cd <package_directory>
- Create a build directory under the package directory and enter that directory:
mkdir build && cd build
- Make the build using cmake:
cmake .. && make
- On a successful make, build and install the package:
sudo make install
Please note that you require sudo permissions to install the packages.
- To update the runtime linker cache, issue the following command:
sudo ldconfig
Once you complete these steps in this order for each of these packages, PySide should be successfully built on your system.
Mac OS X
Building PySide on a Mac system follows the same procedure as the Linux system except that Mac needs Xcode-Developer Tools to be installed as a prerequisite.
Tip
If you are installing the libraries in a nondefault system directory (other than /usr/local
), you may have to update the DYLD_LIBRARY_PATH
by typing the following command:
export DYLD_LIBRARY_PATH=~/my_dir/install/lib