summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorUniversebenzene2023-07-05 19:25:10 +0800
committerUniversebenzene2023-07-05 19:25:10 +0800
commit327609b6e99809c77bb0adee22fc2c3fa6057caa (patch)
tree1dae2c7c015fefca47dacb67e8ddce48eda891bd
parent2908b97272b0c8916e30dcee56b8ea24c94346ef (diff)
downloadaur-327609b6e99809c77bb0adee22fc2c3fa6057caa.tar.gz
Update for new py and numpy
-rw-r--r--PKGBUILD26
1 files changed, 17 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0032dbf40f75..161c30927c8d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,8 +8,13 @@ pkgdesc="Python based tools for spherical geometry"
arch=('i686' 'x86_64')
url="http://www.stsci.edu/resources/software_hardware/stsci_python"
license=('BSD')
-makedepends=('python-setuptools-scm' 'python-numpy' 'qd>=2.3.7' 'python-sphinx-automodapi' 'python-numpydoc')
-checkdepends=('python-pytest' 'python-astropy')
+makedepends=('python-setuptools-scm'
+ 'python-numpy'
+ 'qd>=2.3.7'
+ 'python-sphinx-automodapi'
+ 'python-numpydoc')
+checkdepends=('python-pytest'
+ 'python-astropy')
source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz"
'fix_typo.patch'
'fix_doc_warning.patch')
@@ -17,12 +22,15 @@ md5sums=('8537874297c128da8933416284356e68'
'376f76ebdf3c52048a113c386c091210'
'fed5395d45a2275ccd5e0d63956ecddf')
+get_pyver() {
+ python -c "import sys; print('$1'.join(map(str, sys.version_info[:2])))"
+}
+
prepare() {
cd ${srcdir}/${_pyname}-${pkgver}
# patch -Np1 -i "${srcdir}/fix_doc_warning.patch"
patch -Np1 -i "${srcdir}/fix_typo.patch"
- export _pyver=$(python -c 'import sys; print("%d.%d" % sys.version_info[:2])')
export USE_SYSTEM_QD=1
}
@@ -31,17 +39,17 @@ build() {
python setup.py build
msg "Building Docs"
- python setup.py build_sphinx
+ NUMPY_EXPERIMENTAL_DTYPE_API=1 PYTHONPATH="../build/lib.linux-${CARCH}-cpython-$(get_pyver)" \
+ make -C docs html
}
check() {
cd ${srcdir}/${_pyname}-${pkgver}
- export _pyver=$(python -c 'import sys; print("%d.%d" % sys.version_info[:2])')
- cp "build/lib.linux-${CARCH}-${_pyver}/${_pyname}/math_util.cpython-${_pyver/./}-${CARCH}-linux-gnu.so" \
-"${_pyname}"
- pytest \
- --deselect=spherical_geometry/tests/test_union.py::test_difficult_unions || warning "Tests failed"
+ cp "build/lib.linux-${CARCH}-cpython-$(get_pyver)/${_pyname}/math_util.cpython-$(get_pyver)-${CARCH}-linux-gnu.so" "${_pyname}"
+ NUMPY_EXPERIMENTAL_DTYPE_API=1 pytest \
+ --deselect=spherical_geometry/tests/test_union.py::test_difficult_unions || warning "Tests failed" # -vv --color=yes
+# NUMPY_EXPERIMENTAL_DTYPE_API=1 PYTHONPATH="build/lib.linux-${CARCH}-cpython-$(get_pyver)" pytest -vv --color=yes #"build/lib.linux-${CARCH}-cpython-$(get_pyver)" #\
}
package_python-spherical_geometry() {