void-packages/srcpkgs/python-pytz/template
Piotr Wójcik 66c5848531 srcpkgs: remove tzdata from checkdepends
tzdata was added to base-chroot
2021-06-24 21:16:44 +02:00

38 lines
1 KiB
Bash

# Template file for 'python-pytz'
pkgname=python-pytz
version=2021.1
revision=1
wrksrc="pytz-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
depends="python tzdata"
checkdepends="python-pytest python3-pytest"
short_desc="Python2 timezone library"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="MIT"
homepage="https://pythonhosted.org/pytz/"
distfiles="${PYPI_SITE}/p/pytz/pytz-${version}.tar.gz"
checksum=83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da
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
}
}