From 82d0e3e8e782a50032ee8d5627971472e241e60e Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Tue, 8 Feb 2022 01:40:38 +0000 Subject: [PATCH] added community/python-awkward --- community/python-awkward/PKGBUILD | 61 +++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 community/python-awkward/PKGBUILD diff --git a/community/python-awkward/PKGBUILD b/community/python-awkward/PKGBUILD new file mode 100644 index 000000000..fa4493a74 --- /dev/null +++ b/community/python-awkward/PKGBUILD @@ -0,0 +1,61 @@ +# 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 +}