Installation via apt-get is currently not possible. See github issue and travis docs .
Three other options.
Just use pip
Your .travis.yml will include:
install: - pip install PySide
As you already mentioned, it takes a long time to create PySide from sources on travis-ci servers. However, this method is guaranteed to work.
Wait for Travis CI to upgrade to Ubuntu 14.04
Issue . Python3.4 is included in Ubuntu 14.04. Then your .travis.yml might look like this:
install: - sudo apt-get install python3-pyside
Create your own wheel
You can create your own PySide wheel , so building a Travis-CI using Python3.4 should not create PySide from the source.
Following these instructions , I built the PySide wheel:
$ git clone https://github.com/PySide/pyside-setup.git pyside-setup $ cd pyside-setup $ python3.4 setup.py bdist_wheel --qmake=/usr/bin/qmake-qt4 --version=1.2.2
Then you can place this wheel somewhere and access it with travis:
install: - sudo apt-get install libqt4-dev - pip install PySide
where <your-site> is a web page containing a link to a wheel named PySideXXXXXXX.whl , with the correct naming convention . Use --no-index to prevent PySide from detecting and installing a new user from pypi .
I went ahead and tried this, basic use works!
See the source.
The wheel is placed on the gh page .
Note on my machine with Ubuntu 14.04, creating a wheel, created the dist/PySide-1.2.2-cp34-cp34m-linux_x86_64.whl , which was approximately 17 MB. When I instead added the --standalone tag at build time, the file was ~ 77 MB.
Note that only import PySide has been verified so far. Because of this, created under Ubuntu 14.04 and Travis-Ci servers running Ubuntu 12.04, I donβt know how functional PySide library is. If you run into problems, you can repeat this on a machine with Ubuntu 12.04.
Update:
Next python script
import PySide from PySide import QtGui
failed when the PySide wheel was built on Ubuntu 14.04. See crash . However, this succeeds when PySide is built on Ubuntu 12.04, see success .
Using My PySide Wheel
In your .travis.yml file, specify the following:
install: - sudo apt-get install libqt4-dev - pip install PySide