Skip to content

Setup scripts for the PySide project, fully compatible with python distutils, pip, setuptools/distutils and virtualenv

Notifications You must be signed in to change notification settings

RobinD42/pyside-setup

 
 

Repository files navigation

PySide

PySide is the Python Qt bindings project, providing access the complete Qt 4.8 framework as well as to generator tools for rapidly generating bindings for any C++ libraries.

The PySide project is developed in the open, with all facilities you'd expect from any modern OSS project such as all code in a git repository, an open Bugzilla for reporting bugs, and an open design process. We welcome any contribution without requiring a transfer of copyright.

PySide requires Python 2.6 or later and Qt 4.6 or better.

Install latest setuptools distribution: download ez_setup.py and run it using the python interpreter.

There are two options to install PySide on Windows:

  1. Download and install the packages from the releases page.

  2. Use setuptools:

    c:\> c:\Python27\Scripts\easy_install PySide
    

There are no prebuild setuptools distributions available for UNIX System. To build and install setuptools compatible distributions for UNIX System, please read the instructions in section Building PySide on a UNIX System.

Pip can install only from source (it does not support binary distributions) and allways rebuilds the distribution before the distribution is installed to system. For that reason the recommended tool to install the PySide is easy_install.

  1. Install Python.

  2. Install Qt 4.8 libraries for Windows VS 2008 edition when building against Python 2.6, 2.7 or 3.2. Install Qt 4.8 libraries for Windows VS 2010 edition when building against Python 3.3.

  3. Install Cmake.

  4. Install Windows SDK v7.0 when building against Python 2.6, 2.7 or 3.2. Install Windows SDK v7.1 when building against Python 3.3.

  5. Install Git.

  6. (Optional) Install OpenSSL.

  7. Install latest setuptools distribution into the Python you installed in the first step: download ez_setup.py and run it using the python interpreter of your Python 2.7 installation using a command prompt:

    c:\> c:\Python27\python ez_setup.py
    
  1. Clone PySide setup scripts from git repository:

    c:\> git clone https://github.com/PySide/pyside-setup.git pyside-setup
    
  2. Switch to the pyside-setup directory:

    c:\> cd pyside-setup
    
  3. Build PySide windows installer:

    c:\> c:\Python27\python.exe setup.py bdist_wininst --version=1.2.0 --qmake=c:\Qt\4.8.5\bin\qmake.exe --openssl=c:\OpenSSL32bit\bin
    
  4. To build the development version of PySide windows installer, ignore the --version parameter:

    c:\> c:\Python27\python.exe setup.py bdist_wininst --qmake=c:\Qt\4.8.5\bin\qmake.exe --openssl=c:\OpenSSL32bit\bin
    
  1. After the successful build, install the distribution with easy_install:

    c:\> c:\Python27\Scripts\easy_install dist\PySide-1.2.0.win32-py2.7.exe
    
  1. Install Python 2.7 header files and a static library:

    $ sudo apt-get install python2.7-dev
    
  2. Install Qt 4.8 libraries:

    $ sudo apt-get install qt-sdk
    
  3. Install cmake:

    $ sudo apt-get install cmake
    
  4. Install git:

    $ sudo apt-get install git
    
  5. Install latest setuptools distribution into the Python you installed in the first step: download ez_setup.py and run it using the python interpreter of your Python 2.7 installation using a command prompt:

    $ sudo python2.7 ez_setup.py
    
  1. Clone PySide setup scripts from git repository:

    $ git clone https://github.com/PySide/pyside-setup.git pyside-setup
    
  2. Switch to the pyside-setup directory:

    $ cd pyside-setup
    
  3. Build PySide distribution:

    $ python2.7 setup.py bdist_egg --version=1.2.0
    
  4. Optionally you can build standalone version of distribution with embedded Qt libs:

    $ python2.7 setup.py bdist_egg --standalone --version=1.2.0
    
  5. To build the development version of PySide distribution, ignore the --version parameter:

    $ python2.7 setup.py bdist_egg
    
  1. After the successful build, install the distribution with easy_install and run the post-install script:

    $ sudo easy_install-2.7 dist/PySide-1.2.0-py2.7.egg
    $ sudo python2.7 pyside_postinstall.py -install
    
c:\> c:\Python27\python.exe setup.py [distribution_type] [options]
python2.7 setup.py [distribution_type] [options]
bdist_wininst
Create standalone windows installer with embedded Qt libs and development tools. This distribution type can be installed with easy_install.
bdist_egg
Create egg binary distribution. This distribution type can be installed with easy_install.
install
Install package to site packages folder.
develop
Install package in development mode, such that it's available on sys.path, yet can still be edited directly from its source folder.
sdist
Create full source distribution with included sources of PySide Setup Scripts, PySide, Shiboken, PySide Tools and PySide Examples. Can be used to build binary distribution in offline mode.
--qmake
Specify the path to qmake. Useful when the qmake is not in path or more than one Qt versions are installed.
--openssl
Specify the path to OpenSSL libs.
--only-package
Skip rebuilding everything and create distribution from prebuilt binaries. Before using this option first time, the full distribution build is required.
--cmake
Specify the path to cmake. Useful when the cmake is not in path.
--standalone
When enabled, all required Qt libs will be included in PySide distribution. This option is allways enabled on Windows System. On Linux it's disabled by default.
--version
Specify what version of PySide distribution to build. This option is available only when the setup scripts are cloned from git repository.
--list-versions
List available versions of PySide distributions.
--ignore-git
Don't pull sources from git repository.
--make-spec
Specify the cmake makefile generator type. Available values are msvc on Windows System and make on UNIX System.
--no-examples
Don't include PySide examples in PySide distribution
--jobs
Specify the number of parallel build jobs
--jom
Use jom instead of nmake with msvc
--build-tests
Enable building the tests

About

Setup scripts for the PySide project, fully compatible with python distutils, pip, setuptools/distutils and virtualenv

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 46.9%
  • Python 36.3%
  • C++ 16.8%