Building PySide

This section explains how to build PySide in Windows, Linux, and Macintosh operating systems.

Windows

Before starting to build PySide on Windows, ensure that the following prerequisites are installed:

Make sure that Git and CMake executable is set in your system PATH. Now, follow these steps to start building PySide:

  1. Git clone the PySide repository from Github:
    c:/> git clone https://github.com/PySide/pyside-setup.git pyside-setup
    
  2. Change your working directory to "pyside-setup":
    c:/> cd pyside-setup
    
  3. Build the installer:
    c:> c:Python27python.exe setup.py bdist_wininst --msvc-version=9.0 --make=c:Qt4.8.4inqmake.exe --openssl=c:OpenSSL32bitin
    
  4. Upon successful installation, the binaries can be found in the sub-folder "dist":
    c:pyside-setupdist
    

On completion of these steps, the PySide should have been successfully built on your system.

Linux

To build PySide on Linux, the following prerequisites must be available. Check if you have them already or download them using the following links.

Prerequisites

Building PySide

PySide is a collection of four interdependent packages API Extractor, Generator Runner, Shiboken Generator, and Pyside Qt bindings. In order to build PySide, you have to download and install the packages mentioned previously in that order.

  • API Extractor: A set of libraries used by the bindings generator to parse the header and typesystem files to create an internal representation of the API. [https://distfiles.macports.org/apiextractor/]
  • Generator Runner: Program that controls the bindings generation process according to the rules given by the user through headers, typesystem files, and generator frontends. It is dependent on the API Extractor. [https://distfiles.macports.org/generatorrunner/]
  • Shiboken Generator: Plugin that creates the PySide bindings source files from Qt headers and auxiliary files (typesystems, global.h, and glue files). It is dependent on Generator Runner and API Extractor. [https://distfiles.macports.org/py-shiboken/]
  • PySide Qt Bindings: Set of typesystem definitions and glue code that allows generations or a generation of Python Qt binding modules using the PySide tool chain. It is dependent on Shiboken and Generator Runner. [http://download.qt-project.org/official_releases/pyside/]

Always make sure that you are downloading the packages mentioned previously and building them in the same order as mentioned, since each of the packages are interdependent. Follow these steps to build the packages:

  1. Unzip the downloaded packages and change into the package directory:
    tar –xvf <package_name>
    cd <package_directory>
    
  2. Create a build directory under the package directory and enter that directory:
    mkdir build && cd build
    
  3. Make the build using CMake:
    cmake .. && make
    
  4. On successful make, build and install the package:
    sudo make install
    
  5. Note that you require sudo permissions to install the packages.
  6. To update the runtime linker cache, issue the following command:
    sudo ldconfig
    

Once you follow these steps in order for each of the packages, the PySide should have been successfully built on your system.

Mac OS X

Building PySide on a Mac system is the same as building it on Linux, except that Mac needs XCode-Developer tools to be installed as a prerequisite. The other prerequisites and building procedures are same as Linux.

Tip

If you are installing the libs in a non-default system directory (other than /usr/local), you might have to update the DYLD_LIBRARY_PATH by typing the following command:

export DYLD_LIBRARY_PATH=~/my_dir/install/lib
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.194.106