diff options
Diffstat (limited to 'abs/core')
-rw-r--r-- | abs/core/python_modules/python-tzlocal/PKGBUILD | 74 | ||||
-rw-r--r-- | abs/core/python_modules/python-tzlocal/__changelog | 1 |
2 files changed, 50 insertions, 25 deletions
diff --git a/abs/core/python_modules/python-tzlocal/PKGBUILD b/abs/core/python_modules/python-tzlocal/PKGBUILD index b4e6905..1501907 100644 --- a/abs/core/python_modules/python-tzlocal/PKGBUILD +++ b/abs/core/python_modules/python-tzlocal/PKGBUILD @@ -1,45 +1,71 @@ -# Maintainer: eolianoe <eolianoe At GoogleMAIL DoT com> +# Maintainer: David Runge <dave@sleepmap.de> +# Contributor: eolianoe <eolianoe At GoogleMAIL DoT com> # Contributor: Étienne Deparis <etienne [at] depar.is> # Contributor: Patrice Peterson <runiq at archlinux dot us> # Contributor: Patrick Burroughs <celticmadman at gmail dot com> -_pyname=tzlocal -pkgbase=python-${_pyname} -pkgname=("python2-${_pyname}") -pkgver=1.4 -pkgrel=1 +_name=tzlocal +pkgbase=python-tzlocal +pkgname=("python-tzlocal" "python2-tzlocal") +pkgver=1.5.1 +pkgrel=3 pkgdesc="Tzinfo object for the local timezone" arch=('any') -url='https://pypi.python.org/pypi/tzlocal' -license=('custom') -makedepends=('python2-setuptools') -source=("${_pyname}-${pkgver}.tar.gz::https://github.com/regebro/${_pyname}/archive/${pkgver}.tar.gz") -sha256sums=('d3cdf502a4ae4b566abf948924e837b6c354aaed082eb1326c6c9043824cb4a7') +url="https://pypi.python.org/pypi/tzlocal" +license=('MIT') +makedepends=('python-setuptools' 'python2-setuptools') +checkdepends=('python-mock' 'python2-mock') +source=("${_name}-${pkgver}.tar.gz::https://github.com/regebro/${_name}/archive/${pkgver}.tar.gz") +sha512sums=('30dd1e3973c6fa0e0bde5a0365223506032177e96f997116edfe1fbdcff25cd735c90f205f0b95359a095749f1d1ac077903201533d460a72277891174cc1975') prepare() { - cp -a ${_pyname}-${pkgver}{,-py2} + mv -v "${_name}-${pkgver}" "${pkgname[0]}-${pkgver}" + cp -a "${pkgname}-${pkgver}" "${pkgname[1]}-${pkgver}" } build() { -# cd "${srcdir}/${_pyname}-$pkgver" -# python setup.py build - - cd "${srcdir}/${_pyname}-$pkgver-py2" + cd "${pkgname[0]}-${pkgver}" + python setup.py build + cd ../"${pkgname[1]}-${pkgver}" python2 setup.py build } -package_python2-tzlocal() { - depends=('python2-pytz') - cd "${srcdir}/${_pyname}-${pkgver}-py2" - python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build - install -Dm0644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +check() { + cd "${pkgname[0]}-${pkgver}" + python setup.py test + cd ../"${pkgname[1]}-${pkgver}" + python2 setup.py test } package_python-tzlocal() { depends=('python-pytz') - cd "${srcdir}/${_pyname}-${pkgver}" - python setup.py install --root="${pkgdir}" --optimize=1 --skip-build - install -Dm0644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + cd "${pkgname[0]}-${pkgver}" + python setup.py install --skip-build \ + --optimize=1 \ + --prefix=/usr \ + --root="${pkgdir}" + # license + install -vDm644 LICENSE.txt \ + "${pkgdir}/usr/share/licenses/${pkgname[0]}/LICENSE" + # docs + install -t "${pkgdir}/usr/share/doc/${pkgname[0]}" \ + -vDm644 {CHANGES.txt,README.rst} +} + +package_python2-tzlocal() { + depends=('python2-pytz') + cd "${pkgname[1]}-${pkgver}" + python2 setup.py install --skip-build \ + --optimize=1 \ + --prefix=/usr \ + --root="${pkgdir}" + # license + install -vDm644 LICENSE.txt \ + "${pkgdir}/usr/share/licenses/${pkgname[1]}/LICENSE" + # docs + install -t "${pkgdir}/usr/share/doc/${pkgname[1]}" \ + -vDm644 {CHANGES.txt,README.rst} } # vim:set ts=2 sw=2 et: + diff --git a/abs/core/python_modules/python-tzlocal/__changelog b/abs/core/python_modules/python-tzlocal/__changelog deleted file mode 100644 index c6e1e55..0000000 --- a/abs/core/python_modules/python-tzlocal/__changelog +++ /dev/null @@ -1 +0,0 @@ -PKGBUILD: don't build py 3 stuff |