summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-05-10 12:14:43 +0200
committerErich Eckner <git@eckner.net>2019-05-10 12:14:43 +0200
commit07ad6f8f8bf5a28e4429e824e1931e8381e5df47 (patch)
treee3f6f5feb0402a94a2824932f9023183201c42b7
parent55729d8fc798a855e5d8e622694778933d46cdf2 (diff)
downloadarchlinuxewe.git.save-07ad6f8f8bf5a28e4429e824e1931e8381e5df47.tar.xz
python2-wxmplot -> python-wxmplot
-rwxr-xr-xpython-wxmplot/PKGBUILD73
-rwxr-xr-xpython2-wxmplot/PKGBUILD43
2 files changed, 73 insertions, 43 deletions
diff --git a/python-wxmplot/PKGBUILD b/python-wxmplot/PKGBUILD
new file mode 100755
index 00000000..2cb56a5e
--- /dev/null
+++ b/python-wxmplot/PKGBUILD
@@ -0,0 +1,73 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+pkgbase=python-wxmplot
+pkgname=(python2-wxmplot python-wxmplot)
+pkgver=0.9.34
+pkgrel=1
+pkgdesc='A library for plotting in wxPython using matplotlib'
+arch=('any')
+url='https://pypi.python.org/pypi/wxmplot/0.9.18'
+license=('OSI Approved :: MIT License')
+_deppy2=(
+ 'python2>=2.7'
+ 'python2<2.8'
+ 'python2-wxpython3'
+)
+_deppy=(
+ 'python>=3.7'
+ 'python<3.8'
+ 'python-wxpython'
+)
+_depends=(
+ 'python-matplotlib'
+)
+_makedepends=(
+ 'python-setuptools'
+)
+makedepends=(
+ "${_deppy[@]}"
+ "${_deppy2[@]}"
+ "${_depends[@]}"
+ "${_depends[@]/python/python2}"
+ "${_makedepends[@]}"
+ "${_makedepends[@]/ython/ython2}"
+)
+source=(
+ "${pkgname}-${pkgver}.tar.gz::https://pypi.python.org/packages/99/6a/52f701942cc87fdf205f9720d9190cf119c5cf50dbf7e3031b74f1ce144a/${pkgname#*-}-${pkgver}.tar.gz"
+)
+sha512sums=('3b53cf427f6016e468206fb503707f6615114f81a8c741c2e425f91fcc6efa5497c608c16afef9a8602ff21fd0af25fdc7322702f931ef1286f9f3a7452ce0f0')
+
+prepare() {
+ cp -a ${pkgname#*-}-${pkgver}{,-py2}
+}
+
+build() {
+ echo "Building python..."
+ (
+ cd ${pkgname#*-}-${pkgver}
+ python setup.py build
+ )
+ echo "Building python2..."
+ (
+ cd ${pkgname#*-}-${pkgver}-py2
+ python2 setup.py build
+ )
+}
+
+package_python2-wxmplot() {
+ depends=(
+ "${_deppy2[@]}"
+ "${_depends[@]/python/python2}"
+ )
+ cd ${pkgname#*-}-${pkgver}-py2
+ python2 setup.py install --skip-build --root="${pkgdir}" --prefix=/usr
+ find "${pkgdir}" -type f -exec sed -si '1 s#[/ ]python\s*$# python2#' {} +
+}
+
+package_python-wxmplot() {
+ depends=(
+ "${_deppy[@]}"
+ "${_depends[@]}"
+ )
+ cd ${pkgname#*-}-${pkgver}
+ python setup.py install --skip-build --root="${pkgdir}" --prefix=/usr
+}
diff --git a/python2-wxmplot/PKGBUILD b/python2-wxmplot/PKGBUILD
deleted file mode 100755
index 377643c9..00000000
--- a/python2-wxmplot/PKGBUILD
+++ /dev/null
@@ -1,43 +0,0 @@
-# Maintainer: Erich Eckner <arch at eckner dot net>
-pkgname=python2-wxmplot
-pkgver=0.9.34
-pkgrel=1
-pkgdesc='A library for plotting in wxPython using matplotlib'
-arch=('any')
-url='https://pypi.python.org/pypi/wxmplot/0.9.18'
-license=('OSI Approved :: MIT License')
-groups=()
-depends=(
- 'python2>=2.7'
- 'python2<2.8'
- 'wxpython'
- 'python2-matplotlib'
-)
-makedepends=(
- 'python2-setuptools'
-)
-checkdepends=()
-optdepends=()
-provides=()
-conflicts=()
-replaces=()
-backup=()
-options=()
-source=(
- "${pkgname}-${pkgver}.tar.gz::https://pypi.python.org/packages/99/6a/52f701942cc87fdf205f9720d9190cf119c5cf50dbf7e3031b74f1ce144a/${pkgname#*-}-${pkgver}.tar.gz"
-)
-sha512sums=('3b53cf427f6016e468206fb503707f6615114f81a8c741c2e425f91fcc6efa5497c608c16afef9a8602ff21fd0af25fdc7322702f931ef1286f9f3a7452ce0f0')
-
-build() {
-
- cd ${pkgname#*-}-${pkgver}
- python2 setup.py build
-
-}
-
-package() {
-
- cd ${pkgname#*-}-${pkgver}
- python2 setup.py install --skip-build --root="${pkgdir}" --prefix=/usr
-
-}