python-pytz: update to 2015.2

Use system tz database.
This commit is contained in:
Alessio Sergi 2015-03-28 21:15:15 +01:00
parent ae06fd4874
commit f576b6507e

View file

@ -1,37 +1,42 @@
# Template file for 'python-pytz' # Template file for 'python-pytz'
pkgname=python-pytz pkgname=python-pytz
version=2014.10 version=2015.2
revision=1 revision=1
noarch=yes noarch=yes
wrksrc="pytz-${version}" wrksrc="pytz-${version}"
build_style=python-module build_style=python-module
python_versions="2.7 3.4" python_versions="2.7 3.4"
hostmakedepends="python-setuptools python3.4-setuptools" hostmakedepends="python-setuptools python3.4-setuptools"
depends="python" depends="python tzdata"
pycompile_module="pytz" pycompile_module="pytz"
short_desc="Python2 timezone library" short_desc="Python2 timezone library"
maintainer="Juan RP <xtraeme@gmail.com>" maintainer="Juan RP <xtraeme@gmail.com>"
homepage="https://pypi.python.org/pypi/pytz/" homepage="https://pypi.python.org/pypi/pytz/"
license="MIT" license="MIT"
distfiles="${PYPI_SITE}/p/pytz/pytz-${version}.tar.gz" distfiles="${PYPI_SITE}/p/pytz/pytz-${version}.tar.gz"
checksum=a94138b638907491f473c875e8c95203a6a02efef52b6562be302e435016f4f3 checksum=73daf0eb44ad929ad56972ad30938cb231b725b27dff105b7168e7b4491e0452
pre_install() { pre_build() {
sed -i 's,#!/usr/bin/env python,&3.4,' build-3.4/lib/pytz/tzfile.py sed -i '/^#!/d' pytz/tzfile.py
} }
post_install() { post_install() {
# use system tz database
for pyver in $python_versions; do
rm -rf ${DESTDIR}/usr/lib/python${pyver}/site-packages/pytz/zoneinfo
ln -sf /usr/share/zoneinfo \
${DESTDIR}/usr/lib/python${pyver}/site-packages/pytz/zoneinfo
done
vlicense LICENSE.txt LICENSE vlicense LICENSE.txt LICENSE
} }
python3.4-pytz_package() { python3.4-pytz_package() {
noarch=yes noarch=yes
depends="python3.4" depends="python3.4 tzdata"
pycompile_version="3.4" pycompile_version="3.4"
pycompile_module="pytz" pycompile_module="pytz"
short_desc="${short_desc/Python2/Python3.4}" short_desc="${short_desc/Python2/Python3.4}"
pkg_install() { pkg_install() {
vmove /usr/lib/python3.4 vmove usr/lib/python3.4
vlicense ${wrksrc}/LICENSE.txt LICENSE vlicense LICENSE.txt LICENSE
} }
} }