mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +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>
|
||||
# - remove cuda make/optdepends
|
||||
# - move python-yaml to makedepends
|
||||
# - move python-pyaml to makedepends
|
||||
# - add python-setuptools to makedepends
|
||||
|
||||
_pkgname=awkward
|
||||
pkgname="python-${_pkgname}"
|
||||
pkgver=1.10.1
|
||||
pkgbase="python-${_pkgname}"
|
||||
pkgname=("${pkgbase}" "${pkgbase}-docs")
|
||||
pkgver=1.10.2
|
||||
pkgrel=1
|
||||
pkgdesc="Manipulate jagged, chunky, and/or bitmasked arrays as easily as Numpy"
|
||||
url="https://github.com/scikit-hep/awkward"
|
||||
license=('BSD')
|
||||
arch=('x86_64')
|
||||
depends=('python-numpy' 'python-packaging')
|
||||
makedepends=('cmake' 'git' 'python-build' 'python-installer' 'python-wheel' 'python-yaml' 'python-setuptools')
|
||||
depends=('python-numpy' 'python-packaging' 'python-importlib_resources')
|
||||
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'
|
||||
'root' 'pybind11' 'rapidjson')
|
||||
source=(
|
||||
|
@ -34,14 +38,14 @@ get_pyver () {
|
|||
}
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname}"
|
||||
cd "${srcdir}/${pkgbase}"
|
||||
git submodule init
|
||||
|
||||
git config submodule."pybind11".url "${srcdir}/${pkgname}"-pybind11
|
||||
git config submodule."rapidjson".url "${srcdir}/${pkgname}"-rapidjson
|
||||
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 \
|
||||
|
@ -51,20 +55,29 @@ prepare() {
|
|||
}
|
||||
|
||||
build() {
|
||||
cd "${pkgname}"
|
||||
cd "${srcdir}/${pkgbase}"
|
||||
python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${pkgname}"
|
||||
cd "${srcdir}/${pkgbase}"
|
||||
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'
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${pkgname}"
|
||||
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"${pkgname}"/LICENSE
|
||||
cd "${pkgdir}/usr/lib/python$(get_pyver)/site-packages"
|
||||
# ln -s awkward1 awkward
|
||||
package_python-awkward() {
|
||||
optdepends+=("${pkgbase}-docs: docs")
|
||||
cd "${srcdir}/${pkgbase}"
|
||||
python -m installer --destdir="${pkgdir}" dist/*.whl
|
||||
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
|
||||
}
|
||||
|
||||
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