Date: Thursday, April 6, 2023 @ 02:40:32
Author: felixonmars
Revision: 1438135
archrelease: copy trunk to community-staging-any
Added:
python-vector/repos/community-staging-any/
python-vector/repos/community-staging-any/PKGBUILD
(from rev 1438133, python-vector/trunk/PKGBUILD)
----------+
PKGBUILD | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
Copied: python-vector/repos/community-staging-any/PKGBUILD (from rev 1438133,
python-vector/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-06 02:40:32 UTC (rev 1438135)
@@ -0,0 +1,32 @@
+# Maintainer: Konstantin Gizdov <arch at kge dot pw>
+
+_pkgname='vector'
+pkgname="python-${_pkgname}"
+pkgver='0.11.0'
+pkgrel=2
+pkgdesc="A library for 2D, 3D, and Lorentz vectors, especially arrays of
vectors, to solve common physics problems in a NumPy-like way."
+arch=('any')
+url='https://github.com/scikit-hep/vector'
+license=('MIT')
+depends=('python-numpy' 'python-packaging' 'python-importlib-metadata'
'python-typing-extensions')
+optdepends=('python-awkward: Awkward array support')
+makedepends=('git' 'python-build' 'python-installer' 'python-setuptools-scm'
'python-wheel' 'python-hatchling' 'python-hatch-vcs')
+checkdepends=('python-pytest' 'python-awkward' 'python-papermill')
+source=("${pkgname}::git+${url}#tag=v${pkgver}")
+sha256sums=('SKIP')
+
+build() {
+ cd "${srcdir}/${pkgname}"
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ cd "${srcdir}/${pkgname}"
+ PYTHONPATH="${PWD}/build/lib:${PWD}/src" pytest -k 'not test_intro'
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+ install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}