[arch-commits] Commit in python-qtpy/repos (2 files)

Eli Schwartz eschwartz at archlinux.org
Sun Feb 10 23:11:42 UTC 2019


    Date: Sunday, February 10, 2019 @ 23:11:41
  Author: eschwartz
Revision: 431696

archrelease: copy trunk to community-testing-any

Added:
  python-qtpy/repos/community-testing-any/
  python-qtpy/repos/community-testing-any/PKGBUILD
    (from rev 431695, python-qtpy/trunk/PKGBUILD)

----------+
 PKGBUILD |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

Copied: python-qtpy/repos/community-testing-any/PKGBUILD (from rev 431695, python-qtpy/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2019-02-10 23:11:41 UTC (rev 431696)
@@ -0,0 +1,55 @@
+# Maintainer: Muflone http://www.muflone.com/contacts/english/
+
+pkgbase='python-qtpy'
+_pkgbase='qtpy'
+pkgname=('python-qtpy' 'python2-qtpy')
+pkgver=1.5.1
+pkgrel=2
+pkgdesc='Provides an uniform layer to support PyQt5, PyQt4 and PySide with a single codebase'
+makedepends=('python' 'python-setuptools'
+             'python2' 'python2-setuptools')
+arch=('any')
+url="https://github.com/spyder-ide/${_pkgbase}/"
+license=('MIT')
+source=("${pkgbase}-${pkgver}.tar.gz"::"https://github.com/spyder-ide/${_pkgbase}/archive/v${pkgver}.tar.gz")
+sha256sums=('4ea8e256ee59d68b52146291c199503cc4e3aefdc997408bb6d4c9d344de4c9a')
+
+prepare() {
+  # Prepare sources for Python 2.x
+  cp -r "${_pkgbase}-${pkgver}" "python2-${_pkgbase}-${pkgver}"
+  # Fix Python 2.x shebang
+  cd "python2-${_pkgbase}-${pkgver}"
+  sed -i 's@^#!.*python$@#!/usr/bin/env python2@' "${_pkgbase}/tests/runtests.py"
+}
+
+build() {
+  cd "${_pkgbase}-${pkgver}"
+  python2 setup.py build
+
+  cd "${srcdir}/python2-${_pkgbase}-${pkgver}"
+  python setup.py build
+}
+
+package_python2-qtpy() {
+  depends=('python2')
+  optdepends=('python2-pyqt5: Qt5 Python bindings'
+              'python2-pyqtwebengine: Qt5-WebEngine python bindings'
+              'python2-pyside2: PySide Qt5 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"
+}
+
+package_python-qtpy() {
+  depends=('python')
+  optdepends=('python-pyqt5: Qt5 Python bindings'
+              'python-pyqtwebengine: Qt5-WebEngine python bindings'
+              'python-pyside2: PySide Qt5 Python bindings')
+
+  cd "${_pkgbase}-${pkgver}"
+  python3 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
+  # Install license file
+  install -D -m644 "LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}



More information about the arch-commits mailing list