summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorskydrome2019-07-19 02:45:15 -0400
committerskydrome2019-07-19 02:45:15 -0400
commitc92dcda52793511227a5e07db1de87a232d7f535 (patch)
treecfb9cdc8c0307d9b637b9336ce4bf8a6ae3d25a6
parentf236b315726aaa193154aeecb2c15e64c84d9f87 (diff)
downloadaur-c92dcda52793511227a5e07db1de87a232d7f535.tar.gz
spit package for both python2 and 3
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD31
2 files changed, 30 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 19143b082e6a..bf69aa5f1ca4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,19 @@
-# Generated by mksrcinfo v8
-# Tue Jul 10 17:10:45 UTC 2018
pkgbase = zbase32
pkgdesc = An alternate base32 encoder (not RFC 3548 compliant)
pkgver = 1.1.5
- pkgrel = 2
+ pkgrel = 3
url = https://pypi.python.org/pypi/zbase32
arch = any
license = BSD
makedepends = python2-setuptools
- depends = python2
+ makedepends = python-setuptools
source = https://files.pythonhosted.org/packages/source/z/zbase32/zbase32-1.1.5.tar.gz
source = LICENSE
sha256sums = 9b25c34ba586cbbad4517af516e723599a6f38fc560f4797855a5f3051e6422f
sha256sums = c341afeb154cdcf20c247c8289fadd82245c89d0ea40b630c98885481c29845f
-pkgname = zbase32
+pkgname = python2-zbase32
+ replaces = zbase32
+
+pkgname = python-zbase32
diff --git a/PKGBUILD b/PKGBUILD
index 65ef7235ba13..7b3c4ce565aa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,43 @@
# Contributor: Peter Simons <simons@cryp.to>
# Contributor: Nicolas Pouillard <nicolas.pouillard@gmail.com>
-pkgname=zbase32
+
+pkgbase=zbase32
+pkgname=('python2-zbase32' 'python-zbase32')
pkgver=1.1.5
-pkgrel=2
+pkgrel=3
pkgdesc="An alternate base32 encoder (not RFC 3548 compliant)"
arch=('any')
url='https://pypi.python.org/pypi/zbase32'
license=('BSD')
-depends=('python2')
-makedepends=('python2-setuptools')
+makedepends=('python2-setuptools' 'python-setuptools')
source=("https://files.pythonhosted.org/packages/source/z/zbase32/zbase32-${pkgver}.tar.gz"
'LICENSE')
sha256sums=('9b25c34ba586cbbad4517af516e723599a6f38fc560f4797855a5f3051e6422f'
'c341afeb154cdcf20c247c8289fadd82245c89d0ea40b630c98885481c29845f')
+prepare() {
+ cp -a "zbase32-$pkgver"{,-py2}
+}
+
build() {
- cd "$srcdir/zbase32-$pkgver"
+ cd "$srcdir/zbase32-$pkgver-py2"
python2 setup.py build
-}
-package() {
cd "$srcdir/zbase32-$pkgver"
+ 2to3 -wn -j 4 .
+ python setup.py build
+
+}
+
+package_python2-zbase32() {
+ cd "$srcdir/zbase32-$pkgver-py2"
+ replaces=('zbase32')
python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
install -Dm 644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
+
+package_python-zbase32() {
+ cd "$srcdir/zbase32-$pkgver"
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ install -Dm 644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}