Date: Sunday, May 14, 2023 @ 06:19:20 Author: polyzen Revision: 1460954
archrelease: copy trunk to community-testing-any Added: python-tzlocal/repos/community-testing-any/ python-tzlocal/repos/community-testing-any/PKGBUILD (from rev 1460953, python-tzlocal/trunk/PKGBUILD) ----------+ PKGBUILD | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) Copied: python-tzlocal/repos/community-testing-any/PKGBUILD (from rev 1460953, python-tzlocal/trunk/PKGBUILD) =================================================================== --- community-testing-any/PKGBUILD (rev 0) +++ community-testing-any/PKGBUILD 2023-05-14 06:19:20 UTC (rev 1460954) @@ -0,0 +1,62 @@ +# Maintainer: David Runge <dv...@archlinux.org> +# Maintainer: Daniel M. Capella <poly...@archlinux.org> +# 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> + +_name=tzlocal +pkgname=python-tzlocal +pkgver=5.0 +pkgrel=1 +epoch=1 +pkgdesc="Tzinfo object for the local timezone" +arch=('any') +url="https://github.com/regebro/tzlocal" +license=('MIT') +depends=('python') +makedepends=( + 'python-build' + 'python-installer' + 'python-setuptools' + 'python-wheel' +) +checkdepends=('python-pytest' 'python-pytest-mock') +source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz") +sha256sums=('f96e29a599ef562233cec21ef0d6f7065c3050d0221293e839d1ede093ab1755') +b2sums=('cc7de8dad71965e52c0e471b17f3b23df340b1b5aae3ae5a3ef990d6dd7e12a9ed257ba7a1a2beb88f6841b1a87b2f7fd0313218d6415f75a7402c15421fdef7') + +prepare() { + mv -v "${_name}-${pkgver}" "${pkgname}-${pkgver}" + cd "${pkgname}-${pkgver}" + # fix symlink, required for test: https://github.com/regebro/tzlocal/issues/53 + cd tests/test_data/symlink_localtime/etc + ln -sfv ../usr/share/zoneinfo/Africa/Harare localtime +} + +build() { + cd "${pkgname}-${pkgver}" + python -m build --wheel --skip-dependency-check --no-isolation +} + +check() { + cd "${pkgname}-${pkgver}" + export PYTHONPATH="build:${PYTHONPATH}" + pytest -v -k 'not test_conflicting and not test_noconflict' +} + +package() { + cd "${pkgname}-${pkgver}" + python -m installer --destdir="${pkgdir}" dist/*.whl + # docs + install -vDm 644 {CHANGES.txt,README.rst} \ + -t "${pkgdir}/usr/share/doc/${pkgname}" + + # symlink license file + local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + install -d "${pkgdir}"/usr/share/licenses/${pkgname} + ln -s "${site_packages}"/${_name}-${pkgver}.dist-info/LICENSE.txt \ + "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.txt +} + +# vim:set ts=2 sw=2 et: