void-packages/srcpkgs/python-pytz/template
2017-04-01 20:10:26 +02:00

43 lines
1.2 KiB
Bash

# Template file for 'python-pytz'
pkgname=python-pytz
version=2017.2
revision=1
noarch=yes
wrksrc="pytz-${version}"
build_style=python-module
hostmakedepends="unzip python-setuptools python3-setuptools"
depends="python tzdata"
pycompile_module="pytz"
short_desc="Python2 timezone library"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="https://pythonhosted.org/pytz/"
license="MIT"
distfiles="${PYPI_SITE}/p/pytz/pytz-${version}.zip"
checksum=f5c056e8f62d45ba8215e5cb8f50dfccb198b4b9fbea8500674f3443e4689589
post_install() {
# use system tz database
for py_sitelib in $py2_sitelib $py3_sitelib; do
rm -rf ${DESTDIR}/${py_sitelib}/pytz/zoneinfo
ln -sf /usr/share/zoneinfo ${DESTDIR}/${py_sitelib}/pytz/zoneinfo
done
vlicense LICENSE.txt LICENSE
}
python3-pytz_package() {
noarch=yes
depends="python3 tzdata"
pycompile_module="pytz"
replaces="python3.4-pytz>=0"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/lib/python3*
vlicense LICENSE.txt LICENSE
}
}
python3.4-pytz_package() {
noarch=yes
build_style=meta
short_desc="${short_desc/Python2/Python3.4} (transitional dummy package)"
depends="python3-pytz>=${version}_${revision}"
}