mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-27 00:10:29 +00:00
community/python-awkward to 1.10.2-1
This commit is contained in:
parent
2d924b4798
commit
310935c735
1 changed files with 28 additions and 15 deletions
|
@ -2,19 +2,23 @@
|
||||||
|
|
||||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
# - remove cuda make/optdepends
|
# - remove cuda make/optdepends
|
||||||
# - move python-yaml to makedepends
|
# - move python-pyaml to makedepends
|
||||||
# - add python-setuptools to makedepends
|
# - add python-setuptools to makedepends
|
||||||
|
|
||||||
_pkgname=awkward
|
_pkgname=awkward
|
||||||
pkgname="python-${_pkgname}"
|
pkgbase="python-${_pkgname}"
|
||||||
pkgver=1.10.1
|
pkgname=("${pkgbase}" "${pkgbase}-docs")
|
||||||
|
pkgver=1.10.2
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Manipulate jagged, chunky, and/or bitmasked arrays as easily as Numpy"
|
pkgdesc="Manipulate jagged, chunky, and/or bitmasked arrays as easily as Numpy"
|
||||||
url="https://github.com/scikit-hep/awkward"
|
url="https://github.com/scikit-hep/awkward"
|
||||||
license=('BSD')
|
license=('BSD')
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
depends=('python-numpy' 'python-packaging')
|
depends=('python-numpy' 'python-packaging' 'python-importlib_resources')
|
||||||
makedepends=('cmake' 'git' 'python-build' 'python-installer' 'python-wheel' 'python-yaml' 'python-setuptools')
|
optdepends=('python-pyarrow: pyArrow connector'
|
||||||
|
'python-numexpr: numexpr connector'
|
||||||
|
'python-pandas: pandas connector')
|
||||||
|
makedepends=('cmake' 'git' 'python-build' 'python-installer' 'python-wheel' 'doxygen' 'python-sphinx' 'python-sphinx_rtd_theme' 'python-pyaml' 'python-setuptools')
|
||||||
checkdepends=('python-pytest' 'python-pytest-cov' 'python-hist' 'python-pandas' 'python-numexpr' 'python-pyarrow' 'python-scikit-hep-testdata' 'python-vector'
|
checkdepends=('python-pytest' 'python-pytest-cov' 'python-hist' 'python-pandas' 'python-numexpr' 'python-pyarrow' 'python-scikit-hep-testdata' 'python-vector'
|
||||||
'root' 'pybind11' 'rapidjson')
|
'root' 'pybind11' 'rapidjson')
|
||||||
source=(
|
source=(
|
||||||
|
@ -34,14 +38,14 @@ get_pyver () {
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "${srcdir}/${pkgname}"
|
cd "${srcdir}/${pkgbase}"
|
||||||
git submodule init
|
git submodule init
|
||||||
|
|
||||||
git config submodule."pybind11".url "${srcdir}/${pkgname}"-pybind11
|
git config submodule."pybind11".url "${srcdir}/${pkgname}"-pybind11
|
||||||
git config submodule."rapidjson".url "${srcdir}/${pkgname}"-rapidjson
|
git config submodule."rapidjson".url "${srcdir}/${pkgname}"-rapidjson
|
||||||
git config submodule."dlpack".url "${srcdir}/${pkgname}"-dlpack
|
git config submodule."dlpack".url "${srcdir}/${pkgname}"-dlpack
|
||||||
|
|
||||||
git submodule update --init --recursive
|
git -c protocol.file.allow=always submodule update --init --recursive
|
||||||
|
|
||||||
sed '/cmake/d' -i pyproject.toml
|
sed '/cmake/d' -i pyproject.toml
|
||||||
sed \
|
sed \
|
||||||
|
@ -51,20 +55,29 @@ prepare() {
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "${pkgname}"
|
cd "${srcdir}/${pkgbase}"
|
||||||
python -m build --wheel --no-isolation
|
python -m build --wheel --no-isolation
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
cd "${pkgname}"
|
cd "${srcdir}/${pkgbase}"
|
||||||
local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
|
local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
|
||||||
PYTHONPATH="$PWD/build/lib.linux-$CARCH-cpython-${python_version}" pytest || echo 'some tests fail'
|
PYTHONPATH="$PWD/build/lib.linux-$CARCH-cpython-${python_version}" pytest || echo 'some tests fail'
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package_python-awkward() {
|
||||||
cd "${pkgname}"
|
optdepends+=("${pkgbase}-docs: docs")
|
||||||
python -m installer --destdir="$pkgdir" dist/*.whl
|
cd "${srcdir}/${pkgbase}"
|
||||||
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"${pkgname}"/LICENSE
|
python -m installer --destdir="${pkgdir}" dist/*.whl
|
||||||
cd "${pkgdir}/usr/lib/python$(get_pyver)/site-packages"
|
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
|
||||||
# ln -s awkward1 awkward
|
}
|
||||||
|
|
||||||
|
package_python-awkward-docs() {
|
||||||
|
cd "${srcdir}/${pkgbase}"
|
||||||
|
|
||||||
|
install -D LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||||
|
install -D README.md "${pkgdir}/usr/share/${pkgbase}/README.md"
|
||||||
|
|
||||||
|
install -d "${pkgdir}/usr/share/doc/${pkgbase}"
|
||||||
|
PYTHONPATH="${PWD}/build/lib" sphinx-build "${PWD}/docs-sphinx" "${pkgdir}/usr/share/doc/${pkgbase}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue