diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-07 18:38:16 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-12-27 10:02:50 +0200 |
commit | 24f3cc07e0fbb49001503355be59d0b7f3a63f0d (patch) | |
tree | 0f96d27b1e30e68c6242d2ef4fa50201a1852685 /testing/py-barcodenumber | |
parent | 68e314eebd429c4bc2145efcba20d7814b8641b0 (diff) | |
download | aports-24f3cc07e0fbb49001503355be59d0b7f3a63f0d.tar.bz2 aports-24f3cc07e0fbb49001503355be59d0b7f3a63f0d.tar.xz |
testing/py-barcodenumber: upgrade to 0.2.1 and enable py3
Diffstat (limited to 'testing/py-barcodenumber')
-rw-r--r-- | testing/py-barcodenumber/APKBUILD | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/testing/py-barcodenumber/APKBUILD b/testing/py-barcodenumber/APKBUILD index aec274d3bb..460ed41d2e 100644 --- a/testing/py-barcodenumber/APKBUILD +++ b/testing/py-barcodenumber/APKBUILD @@ -2,40 +2,46 @@ # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> pkgname=py-barcodenumber _pkgname=barcodenumber -pkgver=0.1 +pkgver=0.2.1 pkgrel=0 pkgdesc="A Python module to validate product codes" url="https://bitbucket.org/zikzakmedia/python-barcodenumber" arch="noarch" license="GPL3" -depends="python2" -depends_dev="" -makedepends="python2-dev py-setuptools" -install="" -subpackages="" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" - -_builddir="$srcdir"/$_pkgname-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +builddir="$srcdir"/$_pkgname-$pkgver build() { - cd "$_builddir" + cd "$builddir" python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" } -md5sums="831ad66245ee9438ae5611fcdc358d24 barcodenumber-0.1.tar.gz" -sha256sums="cdbaa7a1e707cbfb94669300340d98e63184ff8630a8d5e36802aad6a14b7477 barcodenumber-0.1.tar.gz" -sha512sums="cc69584b0c1782e953798d687d62a605e47fa8427517e026ec77e688654cc618ecdeb82f5c231483044fdd1bf6cb20d120be4453e1878e4cb2c3a0e432b60f39 barcodenumber-0.1.tar.gz" +md5sums="fbcba0db5a53d57a7f7b7bbd2b018932 barcodenumber-0.2.1.tar.gz" +sha256sums="9d6f3e9b7da2e3690b478a02e25acaa0190562028782964f18014d26fb4b3217 barcodenumber-0.2.1.tar.gz" +sha512sums="5a2f517cf3ea4d0ff9cbcf7b6b81e44cd4cd3a2ac38bc5b2a087a5e84f0917daa560f6bd7eeb33b3a3695f833fcc321b8fee114f28b89eed7bdb4efaf7de4412 barcodenumber-0.2.1.tar.gz" |