[arch-commits] Commit in python-boost-histogram/repos (2 files)
Konstantin Gizdov
kgizdov at archlinux.org
Wed Feb 10 19:20:35 UTC 2021
Date: Wednesday, February 10, 2021 @ 19:20:35
Author: kgizdov
Revision: 853997
archrelease: copy trunk to community-testing-x86_64
Added:
python-boost-histogram/repos/community-testing-x86_64/
python-boost-histogram/repos/community-testing-x86_64/PKGBUILD
(from rev 853996, python-boost-histogram/trunk/PKGBUILD)
----------+
PKGBUILD | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
Copied: python-boost-histogram/repos/community-testing-x86_64/PKGBUILD (from rev 853996, python-boost-histogram/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD (rev 0)
+++ community-testing-x86_64/PKGBUILD 2021-02-10 19:20:35 UTC (rev 853997)
@@ -0,0 +1,33 @@
+# Maintainer: Konstantin Gizdov <arch at kge dot pw>
+
+_pkgname='boost-histogram'
+pkgname="python-${_pkgname}"
+pkgver='0.12.0'
+pkgrel=1
+pkgdesc="Python bindings for Boost's Histogram library."
+arch=('x86_64')
+url='https://github.com/scikit-hep/boost-histogram'
+license=('custom:BSD3')
+depends=('boost-libs' 'python-numpy')
+makedepends=('boost' 'git' 'pybind11' 'python-setuptools' 'python-setuptools-scm')
+checkdepends=('python-pytest' 'python-pytest-benchmark')
+source=("${pkgname}-${pkgver}::git+${url}#tag=v${pkgver}")
+sha256sums=('SKIP')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ python setup.py build
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
+ PYTHONPATH="${PWD}/build/lib.linux-${CARCH}-${python_version}" pytest || return 0 # one test fails due to Boost bug - https://github.com/boostorg/histogram/pull/302
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ export PYTHONHASHSEED=0
+ python setup.py install --skip-build --root="${pkgdir}/" --optimize=1
+ install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
More information about the arch-commits
mailing list