[arch-commits] Commit in python-boost-histogram/repos (2 files)

Konstantin Gizdov kgizdov at gemini.archlinux.org
Fri Dec 3 15:29:26 UTC 2021


    Date: Friday, December 3, 2021 @ 15:29:26
  Author: kgizdov
Revision: 1064820

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 1064819, python-boost-histogram/trunk/PKGBUILD)

----------+
 PKGBUILD |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

Copied: python-boost-histogram/repos/community-testing-x86_64/PKGBUILD (from rev 1064819, python-boost-histogram/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD	                        (rev 0)
+++ community-testing-x86_64/PKGBUILD	2021-12-03 15:29:26 UTC (rev 1064820)
@@ -0,0 +1,67 @@
+# Maintainer: Konstantin Gizdov <arch at kge dot pw>
+
+_pkgname='boost-histogram'
+pkgname="python-${_pkgname}"
+pkgver='1.2.1'
+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=('python-numpy')
+makedepends=('git' 'python-setuptools' 'python-setuptools-scm')
+checkdepends=('python-pytest' 'python-pytest-benchmark')
+source=(
+  "${pkgname}::git+https://github.com/scikit-hep/boost-histogram.git#tag=v${pkgver}"
+  "${pkgname}-pybind11::git+https://github.com/pybind/pybind11.git"
+  "${pkgname}-histogram::git+https://github.com/boostorg/histogram.git"
+  "${pkgname}-core::git+https://github.com/boostorg/core.git"
+  "${pkgname}-mp11::git+https://github.com/boostorg/mp11.git"
+  "${pkgname}-config::git+https://github.com/boostorg/config.git"
+  "${pkgname}-throw_exception::git+https://github.com/boostorg/throw_exception.git"
+  "${pkgname}-assert::git+https://github.com/boostorg/assert.git"
+  "${pkgname}-variant2::git+https://github.com/boostorg/variant2.git"
+)
+
+sha256sums=('SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP')
+
+prepare() {
+  cd "${srcdir}/${pkgname}"
+  git submodule init
+
+  git config submodule."pybind11".url "${srcdir}/${pkgname}"-pybind11
+  git config submodule."extern/boosthistogram".url "${srcdir}/${pkgname}"-histogram
+  git config submodule."extern/core".url "${srcdir}/${pkgname}"-core
+  git config submodule."extern/mp11".url "${srcdir}/${pkgname}"-mp11
+  git config submodule."extern/config".url "${srcdir}/${pkgname}"-config
+  git config submodule."extern/throw_exception".url "${srcdir}/${pkgname}"-throw_exception
+  git config submodule."extern/assert".url "${srcdir}/${pkgname}"-assert
+  git config submodule."extern/variant2".url "${srcdir}/${pkgname}"-variant2
+
+  git submodule update --init --recursive
+}
+
+build() {
+  cd "${srcdir}/${pkgname}"
+  python setup.py build
+}
+
+check() {
+  cd "${srcdir}/${pkgname}"
+  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}"
+  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