Wiki

Clone wiki

pyside_aur / Home

What Is This?

This repository contains build files for Python 2 & Python 3 version of PySide on ArchLinux. If you want to use PySide on ArchLinux without the messy work of manually installing it from the source and losing the benefits of pacman, probably this is what you need.

How To Use It

I assume you have mercurial and all the requirements to build PySide from source.

1. Clone the repository

  $ hg clone https://bitbucket.org/arsooy/pyside_aur

2. Build and install shiboken

  $ cd pyside_aur/shiboken
  $ makepkg

This might take a while.

Installing shiboken packages:

  $ sudo pacman -U shiboken-common-$(VERSION_GOES_HERE).tar.xz


to install shiboken built with python 3:
  $ sudo pacman -U python-shiboken-$(VERSION_GOES_HERE).tar.xz


to install shiboken built with python 2:
  $ sudo pacman -U python2-shiboken-$(VERSION_GOES_HERE).tar.xz

3. Build and install pyside

  $ cd ../pyside
  $ makepkg

This is going to take a while, you can grab a cup of coffee or something.

Installing pyside packages:

  $ sudo pacman -U pyside-common-$(VERSION_GOES_HERE).tar.xz


to install pyside built for python 3:
  $ sudo pacman -U python-pyside-$(VERSION_GOES_HERE).tar.xz


to install pyside built for python 2:
  $ sudo pacman -U python2-pyside-$(VERSION_GOES_HERE).tar.xz

4. Build and install pyside-tools

  $ cd ../pyside-tools
  $ makepkg

This might take a while.

Installing pyside-tools packages:

  $ sudo pacman -U pyside-tools-${VERSION_GOES_HERE}.tar.xz


to install pyside-tools built for python 3:
  $ sudo pacman -U python-pyside-tools-${VERSION_GOES_HERE}.tar.xz


to install pyside-tools built for python 2:
  $ sudo pacman -U python2-pyside-tools-${VERSION_GOES_HERE}.tar.xz

Congratulations! Now you have PySide for Python 3 on your system.

Testing Your Installation

Okay try this:

$ python3
Python 3.2.3 (default, Apr 14 2012, 17:08:04)
[GCC 4.7.0 20120407 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> from PySide import QtCore, QtGui
>>> app = QtGui.QApplication(sys.argv)
>>> lbl = QtGui.QLabel("Hello world from PySide!")
>>> lbl.show()
>>> sys.exit(app.exec_())

You should get a small window with hello world message.

About PySide Tools

Following ArchLinux's policy, the default is the Python 3 build. So if you install python-pyside-tools it will install a symbolic link named pyside-rcc and pyside-uic to binary that generates output for Python 3. To use their Python 2 variants just add '-python2', eg. pyside-rcc-python2.

I'm sorry for any inconveniences.

Updated