Date: Saturday, October 15, 2022 @ 18:27:16 Author: archange Revision: 1329229
Initial addition of pyerfa to [community] Required by astropy Added: python-pyerfa/ python-pyerfa/repos/ python-pyerfa/trunk/ python-pyerfa/trunk/PKGBUILD ----------+ PKGBUILD | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) Added: python-pyerfa/trunk/PKGBUILD =================================================================== --- python-pyerfa/trunk/PKGBUILD (rev 0) +++ python-pyerfa/trunk/PKGBUILD 2022-10-15 18:27:16 UTC (rev 1329229) @@ -0,0 +1,35 @@ +# Maintainer: Bruno Pagani <[email protected]> +# Contributor: Médéric Boquien <[email protected]> + +_pkg=pyerfa +pkgname=python-${_pkg} +pkgver=2.0.0.1 +pkgrel=4 +pkgdesc="Bindings for ERFA routines" +arch=(x86_64) +url="https://pyerfa.readthedocs.io/" +license=(BSD) +depends=(erfa python-numpy) +makedepends=(python-setuptools-scm python-wheel) +checkdepends=(python-pytest) +source=(https://files.pythonhosted.org/packages/source/p/${_pkg}/${_pkg}-${pkgver}.tar.gz) +sha256sums=('2fd4637ffe2c1e6ede7482c13f583ba7c73119d78bef90175448ce506a0ede30') + +build() { + cd ${_pkg}-${pkgver} + PYERFA_USE_SYSTEM_LIBERFA=1 python setup.py build +} + +check() { + sed -e '/addopts/d' -i ${_pkg}-${pkgver}/setup.cfg + local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))') + cd ${_pkg}-${pkgver}/build/lib.linux-${CARCH}-cpython-${python_version}/erfa + pytest -vv --color=yes +} + +package() { + cd ${_pkg}-${pkgver} + PYERFA_USE_SYSTEM_LIBERFA=1 python setup.py install --skip-build --root="${pkgdir}" --optimize=1 + rm -r "${pkgdir}"$(python -c "import site; print(site.getsitepackages()[0])")/erfa/tests + install -Dm644 LICENSE.rst -t "${pkgdir}"/usr/share/licenses/$pkgname/ +}
