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 58F9F5C5053 for ; Sat, 25 Feb 2017 08:09:59 +0000 (GMT) Received: from piha.riseup.net (unknown [10.0.1.163]) (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 1AC671A245D for ; Sat, 25 Feb 2017 08:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1488010199; bh=1Mm+MTuPjL+sPxO0NnuLVwVX77t5aj4aPQAnl/ZmS/Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S+toiR+P0w9kIUjt1GZy8IF6Y3tWqQlpwTYYgOjH9306ad+xTPGYSUBbgsUZwst7q /mJOyY55zSr0Xz2B3xIp6FNeIUNhz5AuVY12qEWkMQyqVmOf/nOXlBN8QljFy84xG9 U19fAAzrHRFROKdDD/cR1apc2c/TCvycYYxAOhSg= Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: pickfire) with ESMTPSA id DB5811C02B6 From: Ivan Tham To: alpine-aports@lists.alpinelinux.org Cc: Ivan Tham Subject: [alpine-aports] [PATCH 2/4] main/py-httplib2: add py3 subpackages Date: Sat, 25 Feb 2017 16:09:42 +0800 Message-Id: <20170225080944.10345-2-pickfire@riseup.net> In-Reply-To: <20170225080944.10345-1-pickfire@riseup.net> References: <20170225080944.10345-1-pickfire@riseup.net> X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- main/py-httplib2/APKBUILD | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/main/py-httplib2/APKBUILD b/main/py-httplib2/APKBUILD index aca2221..2ff97d5 100644 --- a/main/py-httplib2/APKBUILD +++ b/main/py-httplib2/APKBUILD @@ -5,30 +5,41 @@ _pkgname=httplib2 pkgver=0.10.3 pkgrel=0 pkgdesc="A Python HTTP client library" -url="https://github.com/jcgregorio/httplib2" +url="https://github.com/httplib2/httplib2" arch="noarch" license="MIT" -depends="python2" -makedepends="python2-dev py-setuptools" +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() { - default_prepare || return 1 - - cd "$builddir" - chmod 644 python2/${_pkgname}.egg-info/* -} - build() { cd "$builddir" python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { + 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" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 - chmod o+r $pkgdir/usr/lib/python2.7/site-packages/httplib2/cacerts.txt + $python setup.py install --prefix=/usr --root="$subpkgdir" } sha512sums="d024986ffd577858017d7a8cfcae98a6cd04b8c89634ea302df4c1443eb2381cecca6ffbb631c9d4260335a3462df6d5604ec485aa591a05cb0231a3f6745aaa httplib2-0.10.3.tar.gz" -- 2.11.1 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---