# Maintainer: Felix Yan # ALARM: Kevin Mihelich # - remove cuda make/optdepends # - move python-pyaml to makedepends _pkgname=awkward pkgname="python-${_pkgname}" pkgver=1.7.0 pkgrel=1 pkgdesc="Manipulate jagged, chunky, and/or bitmasked arrays as easily as Numpy" url="https://github.com/scikit-hep/awkward-array" license=('BSD') arch=('x86_64') depends=('python-numpy') makedepends=('cmake' 'git' 'python-setuptools' 'python-pyaml') checkdepends=('python-pyaml' 'python-pytest' 'python-pytest-cov' 'python-pandas' 'python-numexpr' 'python-pyarrow' 'python-vector') source=( "${pkgname}::git+https://github.com/scikit-hep/${_pkgname}-1.0#tag=${pkgver}" "${pkgname}-dlpack::git+https://github.com/dmlc/dlpack.git" "${pkgname}-rapidjson::git+https://github.com/Tencent/rapidjson.git" "${pkgname}-pybind11::git+https://github.com/pybind/pybind11.git" ) sha512sums=('SKIP' 'SKIP' 'SKIP' 'SKIP') get_pyver () { python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))' } prepare() { cd "${srcdir}/${pkgname}" 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 } build() { cd "${pkgname}" python setup.py build } check() { cd "${pkgname}" PYTHONPATH="build/lib.linux-${CARCH}-$(get_pyver)" pytest tests } package() { cd "${pkgname}" python setup.py install --root="${pkgdir}" --optimize=1 install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"${pkgname}"/LICENSE cd "${pkgdir}/usr/lib/python$(get_pyver)/site-packages" # ln -s awkward1 awkward }