diff options
Diffstat (limited to 'abs/core/python_modules/python-pytz/PKGBUILD')
-rw-r--r-- | abs/core/python_modules/python-pytz/PKGBUILD | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/abs/core/python_modules/python-pytz/PKGBUILD b/abs/core/python_modules/python-pytz/PKGBUILD index fca20e0..7eb49b7 100644 --- a/abs/core/python_modules/python-pytz/PKGBUILD +++ b/abs/core/python_modules/python-pytz/PKGBUILD @@ -4,23 +4,31 @@ # Contributor: William Rea <sillywilly@gmail.com> pkgname=('python-pytz' 'python2-pytz') -pkgver=2018.3 -pkgrel=1 +pkgver=2020.4 +pkgrel=3 arch=('any') -url="http://pypi.python.org/pypi/pytz" +url="https://pypi.python.org/pypi/pytz" license=("MIT") makedepends=('python' 'python2') -source=("https://pypi.io/packages/source/p/pytz/pytz-${pkgver}.tar.gz") -md5sums=('abb07c09c79f78d7c04f222a550c99ef') +source=("https://pypi.io/packages/source/p/pytz/pytz-${pkgver}.tar.gz" + "0001-Use-the-system-zoneinfo-from-the-tzdata-package.patch") +sha512sums=('dcbe763bc6e48c52df855fe03a8109dc0656a0e851324c0468f4307e8aff60e577fe0c9f0b062319e90d2f639b96e98edf8346064705e244143386c863a0aa7c' + '3cbd497313c3049a2ae04298118aefb6dfa9ec4626078c665c95c13a78ae944b33a68813aea0c53b02b0532b64221cca4a0cd2153bd91b3760916bc3c0f6df8f') validpgpkeys=('C7ECC365AB6F255E1EB9BA1701FA998FBAC6374A') +prepare() { + cd pytz-$pkgver + + patch -p2 -i ../0001-Use-the-system-zoneinfo-from-the-tzdata-package.patch + rm -r pytz/zoneinfo/ +} + build(){ - cd $srcdir cp -rf pytz-$pkgver pytz2-$pkgver } check(){ - cd $srcdir/pytz-$pkgver/pytz/tests + cd pytz-$pkgver/pytz/tests python3 test_tzinfo.py python2 test_tzinfo.py @@ -30,14 +38,11 @@ package_python-pytz(){ depends=('python') pkgdesc="Cross platform time zone library for Python" - cd $srcdir/pytz-$pkgver + cd pytz-$pkgver - # Fix locale https://github.com/ipython/ipython/issues/2057 - export LC_ALL=en_US.UTF-8 + python3 setup.py install --root="$pkgdir"/ - python3 setup.py install --root=$pkgdir/ - - install -D LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE + install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE } @@ -45,12 +50,9 @@ package_python2-pytz(){ depends=('python2') pkgdesc="Cross platform time zone library for Python" - cd $srcdir/pytz2-$pkgver - - # python 2 fix -# sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' pytz/tzfile.py + cd pytz2-$pkgver - python2 setup.py install --root="$pkgdir/" + python2 setup.py install --root="$pkgdir"/ - install -D LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE } |