X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by lists.alpinelinux.org (Postfix) with ESMTP id 05B615C544C for ; Sun, 7 May 2017 16:59:31 +0000 (GMT) Received: from cotinga.riseup.net (unknown [10.0.1.164]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id 996FB1A0961 for ; Sun, 7 May 2017 16:59:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1494176370; bh=/xmpts11PPAiXi6fWuc4YCrA8rfEq3v4GgJQJOO/YlM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BDqbUHj1nmpdxDMaBwbWx7KJMEqAqE77aiaHaHGsEBc2WUO/gYBUBfxUMMjRlDHau kyAEYxaAj7oZP8SxTBqEAcFfaeJZVMuePSkr5mIZwZiQvdzEWwbRO0tDLR4Tg7RPvp qVxK01fvoyIn+HcbGpQ3Jln/OlXbD36qV5s91hIo= Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: pickfire@riseup.net) by (cotinga) with ESMTPSA id B125F4AC5C From: Ivan Tham To: alpine-aports@lists.alpinelinux.org Subject: [alpine-aports] [PATCH 6/8] main/py-nose: Add support for python3 Date: Mon, 8 May 2017 00:59:13 +0800 Message-Id: <20170507165915.27204-6-pickfire@riseup.net> In-Reply-To: <20170507165915.27204-1-pickfire@riseup.net> References: <20170507165915.27204-1-pickfire@riseup.net> X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- main/py-nose/APKBUILD | 51 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/main/py-nose/APKBUILD b/main/py-nose/APKBUILD index 7476876388..29ac3bac63 100644 --- a/main/py-nose/APKBUILD +++ b/main/py-nose/APKBUILD @@ -8,32 +8,45 @@ pkgdesc="A Python unittest module" url="http://readthedocs.org/docs/nose/" arch="noarch" license="LGPL2+" -depends="python2 py-setuptools" -depends_dev="" -makedepends="python2-dev" -install="" -subpackages="" +depends="" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_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 +} + +check() { + cd "$builddir" + python2 setup.py check || return 1 + python3 setup.py check || return 1 } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + +_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" || return 1 +} + +_py2() { + replace="$pkgname" + _py python2 +} + +_py3() { + _py python3 } md5sums="4d3ad0ff07b61373d2cefc89c5d0b20b nose-1.3.7.tar.gz" -- 2.12.2 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---