summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-01-14 14:06:56 +0100
committerErich Eckner <git@eckner.net>2019-01-14 14:06:56 +0100
commit524c7a5b87a710b1dcb8429ec763ac55cd977c80 (patch)
treece9725bf472a745c546a9c58d9e1d02d007f0a42
parent899f961077329f4e6206accbcc412b09f3a966e7 (diff)
downloadarchlinuxewe.git.save-524c7a5b87a710b1dcb8429ec763ac55cd977c80.tar.xz
python2-wxutils -> python-wxutils
-rwxr-xr-xpython-wxutils/PKGBUILD70
-rwxr-xr-xpython2-wxutils/PKGBUILD42
2 files changed, 70 insertions, 42 deletions
diff --git a/python-wxutils/PKGBUILD b/python-wxutils/PKGBUILD
new file mode 100755
index 00000000..9069fcf8
--- /dev/null
+++ b/python-wxutils/PKGBUILD
@@ -0,0 +1,70 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+pkgbase=python-wxutils
+pkgname=(python2-wxutils python-wxutils)
+pkgver=0.2.3
+pkgrel=1
+pkgdesc='A library of convenience functions for wxPython'
+arch=('any')
+url='https://pypi.python.org/pypi/wxutils/0.1.2'
+license=('BSD')
+groups=()
+_deppy2=(
+ 'python2>=2.7'
+ 'python2<2.8'
+ 'wxpython'
+)
+_deppy=(
+ 'python>=3.7'
+ 'python<3.8'
+ 'python-wxpython'
+)
+_makedepends=(
+ 'python-setuptools'
+)
+makedepends=(
+ "${_deppy[@]}"
+ "${_deppy2[@]}"
+ "${_makedepends[@]}"
+ "${_makedepends[@]/ython/ython2}"
+)
+source=(
+ "${pkgname}-${pkgver}.tar.gz::https://pypi.python.org/packages/55/e9/dbec604ebb961cca28c6e835d050326d87f592d4bdc8171097230ea5b407/${pkgname#*-}-${pkgver}.tar.gz"
+)
+sha512sums=('098d9b1030f16478db37960fcb9fc414222c8e3623bb6910b5281b986a43b4a6c879b1af09a836bd659b220aeb5e2d3f31d4d6474e241fe03c4893a3dea85218')
+
+prepare() {
+ cp -a ${pkgbase#*-}-${pkgver}{,-py2}
+}
+
+build() {
+
+ echo "Building python2..."
+ cd "${srcdir}/${pkgbase#*-}-${pkgver}-py2"
+ python2 setup.py build
+
+ echo "Building python..."
+ cd "${srcdir}/${pkgbase#*-}-${pkgver}"
+ python setup.py build
+
+}
+
+package_python2-wxutils() {
+
+ depends=(
+ "${_deppy2[@]}"
+ )
+ cd ${pkgname#*-}-${pkgver}-py2
+ python2 setup.py install --skip-build --root="${pkgdir}" --prefix=/usr
+ find "${pkgdir}" -type f -exec sed -i '1 s@^\(#!/usr/bin\(/env\s\+\)\?python\)\s*$@\12@' {} \;
+
+}
+
+package_python-wxutils() {
+
+ depends=(
+ "${_deppy[@]}"
+ )
+ cd ${pkgname#*-}-${pkgver}
+ python setup.py install --skip-build --root="${pkgdir}" --prefix=/usr
+
+}
diff --git a/python2-wxutils/PKGBUILD b/python2-wxutils/PKGBUILD
deleted file mode 100755
index 5155f8ef..00000000
--- a/python2-wxutils/PKGBUILD
+++ /dev/null
@@ -1,42 +0,0 @@
-# Maintainer: Erich Eckner <arch at eckner dot net>
-pkgname=python2-wxutils
-pkgver=0.2.3
-pkgrel=1
-pkgdesc='A library of convenience functions for wxPython'
-arch=('any')
-url='https://pypi.python.org/pypi/wxutils/0.1.2'
-license=('BSD')
-groups=()
-depends=(
- 'python2>=2.7'
- 'python2<2.8'
- 'wxpython'
-)
-makedepends=(
- 'python2-setuptools'
-)
-checkdepends=()
-optdepends=()
-provides=()
-conflicts=()
-replaces=()
-backup=()
-options=()
-source=(
- "${pkgname}-${pkgver}.tar.gz::https://pypi.python.org/packages/55/e9/dbec604ebb961cca28c6e835d050326d87f592d4bdc8171097230ea5b407/${pkgname#*-}-${pkgver}.tar.gz"
-)
-sha512sums=('098d9b1030f16478db37960fcb9fc414222c8e3623bb6910b5281b986a43b4a6c879b1af09a836bd659b220aeb5e2d3f31d4d6474e241fe03c4893a3dea85218')
-
-build() {
-
- cd ${pkgname#*-}-${pkgver}
- python2 setup.py build
-
-}
-
-package() {
-
- cd ${pkgname#*-}-${pkgver}
- python2 setup.py install --skip-build --root="${pkgdir}" --prefix=/usr
-
-}