mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 17:57:13 +08:00
58 lines
1.2 KiB
Bash
58 lines
1.2 KiB
Bash
|
#
|
||
|
# Platform packages for Chakra, part of www.chakraos.org
|
||
|
#
|
||
|
|
||
|
pkgname=('python3-pytz' 'python2-pytz')
|
||
|
pkgver=2014.7
|
||
|
pkgrel=1
|
||
|
arch=('any')
|
||
|
url="http://pypi.python.org/pypi/pytz"
|
||
|
license=("MIT")
|
||
|
makedepends=('python3' 'python2')
|
||
|
source=(http://pypi.python.org/packages/source/p/pytz/pytz-$pkgver.tar.bz2{,.asc})
|
||
|
md5sums=('5c1d3966406c6637b95d1eb2652cd8e1'
|
||
|
'SKIP')
|
||
|
|
||
|
build(){
|
||
|
cd $srcdir
|
||
|
cp -rf pytz-$pkgver pytz2-$pkgver
|
||
|
}
|
||
|
|
||
|
check(){
|
||
|
cd $srcdir/pytz-$pkgver/pytz/tests
|
||
|
|
||
|
python3 test_tzinfo.py
|
||
|
|
||
|
python2 test_tzinfo.py
|
||
|
|
||
|
}
|
||
|
|
||
|
package_python3-pytz(){
|
||
|
depends=('python3')
|
||
|
pkgdesc="Cross platform time zone library for Python"
|
||
|
|
||
|
cd $srcdir/pytz-$pkgver
|
||
|
|
||
|
# Fix locale https://github.com/ipython/ipython/issues/2057
|
||
|
export LC_ALL=en_US.UTF-8
|
||
|
|
||
|
python3 setup.py install --root=$pkgdir/
|
||
|
|
||
|
install -D LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||
|
}
|
||
|
|
||
|
|
||
|
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
|
||
|
|
||
|
python2 setup.py install --root="$pkgdir/"
|
||
|
|
||
|
install -D LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||
|
}
|