Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Pyside GUI Application Development- Second Edition

You're reading from   Pyside GUI Application Development- Second Edition Develop more dynamic and robust GUI applications using PySide, an open source cross-platform UI framework

Arrow left icon
Product type Paperback
Published in Jan 2016
Publisher Packt
ISBN-13 9781785282454
Length 144 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Venkateshwaran Loganathan Venkateshwaran Loganathan
Author Profile Icon Venkateshwaran Loganathan
Venkateshwaran Loganathan
Gopinath Jaganmohan Gopinath Jaganmohan
Author Profile Icon Gopinath Jaganmohan
Gopinath Jaganmohan
Arrow right icon
View More author details
Toc

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:

  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 a successful make, build and install the package:
    sudo make install
    

    Please note that you require sudo permissions to install the packages.

  5. 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
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime