testing/py-isbn: upgrade to 1.0.1 and enable py3

This commit is contained in:
Fabian Affolter 2016-11-07 17:34:02 +00:00 committed by Timo Teräs
parent 65ff81915e
commit e2b19b75e2

View File

@ -2,23 +2,20 @@
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-isbn
_pkgname=pyisbn
pkgver=1.0.0
pkgver=1.0.1
pkgrel=0
pkgdesc="A module for working with 10- and 13-digit ISBNs"
url="https://github.com/JNRowe/pyisbn"
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
_builddir="$srcdir"/$_pkgname-$pkgver
prepare() {
local i
cd "$_builddir"
cd "$builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
@ -27,15 +24,34 @@ prepare() {
}
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"
}
md5sums="072dfa58b07d7b0c75a0cec70fb83620 pyisbn-1.0.0.tar.gz"
sha256sums="85a3e5545e8e824c1c8e05a50f2962e45278ed54d74027957ae790cac6e8689f pyisbn-1.0.0.tar.gz"
sha512sums="cb4dc6a1f52ffec818fb96448fe18b244b05d2739af3cf56a85b9f4c9d72a2783d3a279fdd6fd8bca853451443cdc4b82e839ad3a8e7d4af2b9f91257b0a3c73 pyisbn-1.0.0.tar.gz"
_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="ea6fe1a1d0353d6a24f6dc5e57609bf9 pyisbn-1.0.1.tar.gz"
sha256sums="aa04efaf49446d43894b563ab6ea32fe3353a1f9146fc2e0d03f1de30e09d2c3 pyisbn-1.0.1.tar.gz"
sha512sums="65575b96f0dd2a96ad0a62d3b274f65dc3ffaee6cc6207b4461f67c1e7071db8153cf0ce1afa2d266488725c94f6e931351935f343fa0b934e5a696b778fba2c pyisbn-1.0.1.tar.gz"