[arch-commits] Commit in python-iminuit/repos (2 files)
Konstantin Gizdov
kgizdov at gemini.archlinux.org
Sun Mar 6 12:24:13 UTC 2022
Date: Sunday, March 6, 2022 @ 12:24:12
Author: kgizdov
Revision: 1142322
archrelease: copy trunk to community-x86_64
Added:
python-iminuit/repos/community-x86_64/
python-iminuit/repos/community-x86_64/PKGBUILD
(from rev 1142321, python-iminuit/trunk/PKGBUILD)
----------+
PKGBUILD | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)
Copied: python-iminuit/repos/community-x86_64/PKGBUILD (from rev 1142321, python-iminuit/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2022-03-06 12:24:12 UTC (rev 1142322)
@@ -0,0 +1,74 @@
+# Maintainer: Konstantin Gizdov <arch at kge dot pw>
+# Contributor: Astro Benzene <universebenzene at sina dot com>
+_pkgname=iminuit
+pkgbase="python-${_pkgname}"
+pkgname=("python-${_pkgname}" "python-${_pkgname}-docs")
+pkgver=2.10.0
+pkgrel=1
+pkgdesc="Python interface for MINUIT, a physics analysis tool for function minimization."
+arch=('x86_64')
+url="https://iminuit.readthedocs.io"
+license=('GPL' 'MIT')
+depends=('python-numpy')
+makedepends=('git' 'cmake' 'python-setuptools' 'python-wheel' 'python-build' 'python-installer'
+ 'python-nbsphinx' 'python-sphinx_rtd_theme' 'python-matplotlib' 'python-pillow' 'pandoc')
+checkdepends=('python-pytest' 'python-scipy' 'python-tabulate')
+options=(!emptydirs)
+source=(
+ "${pkgbase}::git+https://github.com/scikit-hep/iminuit#tag=v${pkgver}"
+ "${pkgbase}-pybind11::git+https://github.com/pybind/pybind11.git"
+ "${pkgbase}-root::git+https://github.com/root-project/root.git"
+)
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP')
+
+get_pyver () {
+ python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
+}
+
+prepare() {
+ cd "${srcdir}/${pkgbase}"
+ git submodule init
+
+ git config submodule."extern/root".url "${srcdir}/${pkgname}"-root
+ git config submodule."extern/pybind11".url "${srcdir}/${pkgname}"-pybind11
+
+ git submodule update --init --recursive
+
+ # python-cmake is not needed
+ sed -i '/cmake/d' pyproject.toml
+}
+
+build() {
+ cd "${srcdir}/${pkgbase}"
+
+ # build
+ python -m build --wheel --no-isolation
+
+ # build docs
+ PYTHONPATH="build/lib.linux-${CARCH}-$(get_pyver)" make build/html/done
+}
+
+check() {
+ cd "${srcdir}/${pkgbase}"
+
+ PYTHONPATH="build/lib.linux-${CARCH}-$(get_pyver)" pytest || warning "Tests failed"
+}
+
+package_python-iminuit() {
+ optdepends=('python-iminuit-doc: Documentation for python-iminuit')
+ cd "${srcdir}/${pkgname}"
+
+ install -D -m644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -D -m644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+ python -m installer --destdir="${pkgdir}" dist/*.whl
+}
+
+package_python-iminuit-docs() {
+ cd "${srcdir}/${pkgbase}"
+
+ install -d -m755 "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -a build/html "${pkgdir}/usr/share/doc/${pkgname}"
+ install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
+}
More information about the arch-commits
mailing list