summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD36
1 files changed, 25 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ac16b7ad666f..5bb790f1f1c0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,38 +1,52 @@
# Maintainer: Astro Benzene <universebenzene at sina dot com>
+
pkgname=python-healpy
_pyname=${pkgname#python-}
-pkgver=1.14.0
+pkgver=1.16.6
pkgrel=1
pkgdesc="Python package to manipulate healpix maps"
arch=('i686' 'x86_64')
url="http://healpy.readthedocs.io"
license=('GPL')
-depends=('python>=3.4' 'python-numpy>=1.13' 'python-matplotlib' 'python-astropy' 'cfitsio' 'healpix>=3.60' 'python-six')
-makedepends=('cython>=0.16' 'python-pytest-runner')
+depends=('python>=3.8' 'python-numpy>=1.19' 'python-scipy' 'python-matplotlib' 'python-astropy' 'cfitsio>=4.1.0' 'healpix>=3.82')
+makedepends=('python-setuptools-scm>=6.2'
+ 'cython'
+ 'python-wheel'
+ 'python-build'
+ 'python-installer')
optdepends=('python-healpy-doc: Documentation for healpy')
-checkdepends=('python-pytest-cython' 'python-pytest-doctestplus' 'python-pillow' 'python-requests')
+checkdepends=('python-pytest-cython'
+ 'python-pytest-doctestplus') # requests -> pooch -> scipy
source=("https://files.pythonhosted.org/packages/source/h/healpy/healpy-${pkgver}.tar.gz")
-md5sums=('2e56fdad5fa3780f7381449a7b2672fb')
+md5sums=('3ce7788da61cc6e8ad38c9cd0267ed04')
+
+get_pyver() {
+ python -c "import sys; print('$1'.join(map(str, sys.version_info[:2])))"
+}
prepare() {
- export _pyver=$(python -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ sed -i -e "/pykg/d" -e "/\"numpy>=1.25\"/s/,/\]/" pyproject.toml
}
build() {
cd ${srcdir}/${_pyname}-${pkgver}
- python setup.py build
+ python -m build --wheel --no-isolation
}
check() {
- cd ${srcdir}/${_pyname}-${pkgver}/build/lib.linux-${CARCH}-${_pyver}
+ cd ${srcdir}/${_pyname}-${pkgver}
- pytest
+ # skip tests that cost lots of time
+ pytest "build/lib.linux-${CARCH}-cpython-$(get_pyver)" \
+ --deselect=build/lib.linux-${CARCH}-cpython-$(get_pyver)/healpy/test/test_pixelweights.py::test_pixelweights_local_datapath || warning "Tests failed" # -vv -l -ra --color=yes -o console_output_style=count
}
package() {
- cd ${srcdir}/healpy-${pkgver}
+ cd ${srcdir}/${_pyname}-${pkgver}
install -D -m644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
- python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
+ python -m installer --destdir="${pkgdir}" dist/*.whl
}