pyside_aur / python-pyside-tools / PKGBUILD

# Maintainer: arlx_ignacy <>
# Contributor: Matthias Maennich <>

# modify these two to whatever Python 3 interpreter you're targetting; on my
# system I use the vanilla python3

pkgdesc='PySide development tools (pyuic and pyrcc) for Python 3.'
arch=('i686' 'x86_64')
depends=('python-pyside>=1.1.0' 'python')
makedepends=('cmake' 'automoc4' 'python-shibokengenerator>=1.1.0' 'patch' 'sed')

build() {
    cd "$srcdir/pyside-tools-$pkgver"

    msg "Applying patches ..."
    # this patch from running 2to3-3.2
    patch -p1 < ../../2to3.patch
    # this patch to make it runable on Python 3
    patch -p1 < ../../py3.patch

    # of course, if you want to undo the patches you can use:
    #  $ patch -p1 -R < ../../py3.patch
    #  $ patch -p1 -R < ../../2to3.patch

    cd ..
    if [ -d build ] ; then
        msg "Removing last build ..."
        rm -rf build

    mkdir build
    cd build

    # change interpreter to what we set it to
    sed -i -e "1c #!$_pyexec" ../pyside-tools-$pkgver/pyside-uic
    chmod 755 ../pyside-tools-$pkgver/pyside-uic

    cmake ../pyside-tools-$pkgver -DCMAKE_INSTALL_PREFIX=/usr             \
                                  -DCMAKE_BUILD_TYPE=Release              \

package() {
    cd "$srcdir/build"
    make DESTDIR=$pkgdir install
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.