summaryrefslogtreecommitdiff
path: root/python2-qtpy
diff options
context:
space:
mode:
Diffstat (limited to 'python2-qtpy')
-rw-r--r--python2-qtpy/PKGBUILD36
1 files changed, 36 insertions, 0 deletions
diff --git a/python2-qtpy/PKGBUILD b/python2-qtpy/PKGBUILD
new file mode 100644
index 000000000..0ec4d9442
--- /dev/null
+++ b/python2-qtpy/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+# Contributor: Muflone http://www.muflone.com/contacts/english/
+
+pkgname='python2-qtpy'
+_pkgname="${pkgname#*-}"
+pkgver=1.8.0
+pkgrel=1
+pkgdesc='Provides an uniform layer to support PyQt5, PyQt4 and PySide with a single codebase'
+makedepends=('python2' 'python2-setuptools')
+arch=('any')
+url="https://github.com/spyder-ide/${_pkgbase}/"
+license=('MIT')
+source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/spyder-ide/${_pkgname}/archive/v${pkgver}.tar.gz")
+sha256sums=('f4d5bdeeac2a859ecaf72b52ed6502f00946e255d635911866efa8cbab95238d')
+
+prepare() {
+ # Fix Python 2.x shebang
+ cd "${_pkgname}-${pkgver}"
+ sed -i 's@^#!.*python$@#!/usr/bin/env python2@' "${_pkgname}/tests/runtests.py"
+}
+
+build() {
+ cd "${_pkgname}-${pkgver}"
+ python2 setup.py build
+}
+
+package() {
+ depends=('python2')
+ optdepends=('python2-pyqt5: Qt5 Python bindings'
+ 'python2-pyqtwebengine: Qt5-WebEngine python bindings')
+
+ cd "${_pkgname}-${pkgver}"
+ python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
+ # Install license file
+ install -D -m644 "LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}