void-packages/srcpkgs/python-pytz/template

39 lines
1.0 KiB
Bash

# Template file for 'python-pytz'
pkgname=python-pytz
version=2020.5
revision=1
wrksrc="pytz-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
depends="python tzdata"
checkdepends="python-pytest python3-pytest tzdata"
short_desc="Python2 timezone library"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="MIT"
homepage="https://pythonhosted.org/pytz/"
distfiles="${PYPI_SITE}/p/pytz/pytz-${version}.tar.gz"
checksum=180befebb1927b16f6b57101720075a984c019ac16b1b7575673bea42c6c3da5
do_check() {
PYTHONPATH=build-2.7/lib python2 -m pytest
PYTHONPATh=build-${py3_ver}/lib python3 -m pytest
}
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() {
depends="python3 tzdata"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/lib/python3*
vlicense LICENSE.txt LICENSE
}
}