Commit eb8e0230 authored by Jakub Jirutka's avatar Jakub Jirutka 🇺🇦
Browse files

main/py-tz: add py2/py3 subpackages

parent 5c68640d
...@@ -3,37 +3,45 @@ ...@@ -3,37 +3,45 @@
pkgname=py-tz pkgname=py-tz
_pkgname=pytz _pkgname=pytz
pkgver=2016.6.1 pkgver=2016.6.1
pkgrel=0 pkgrel=1
pkgdesc="A Python definitions of world timezone" pkgdesc="A Python definitions of world timezone"
url="" url=""
arch="noarch" arch="noarch"
license="MIT" license="MIT"
depends="python" depends=""
depends_dev="" makedepends="python2-dev python3-dev py-setuptools"
makedepends="python-dev py-setuptools" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" source="${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
build() { build() {
cd "$_builddir" cd "$builddir"
python build || return 1
python2 build || return 1
python3 build
} }
package() { package() {
cd "$_builddir" mkdir -p "$pkgdir"
python install --prefix=/usr --root="$pkgdir" || return 1 }
_py2() {
_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 install --prefix=/usr --root="$subpkgdir"
} }
md5sums="b6c28a3b968bc1d8badfb61b93874e03 pytz-2016.6.1.tar.gz" md5sums="b6c28a3b968bc1d8badfb61b93874e03 pytz-2016.6.1.tar.gz"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment