blob: 139f7a0d9645a2dfddac1c438017cbc6a07c3ad4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Maintainer: Iyán Méndez Veiga <me (at) iyanmv (dot) com>
_pkgname=qiskit-nature
pkgname=python-${_pkgname}
pkgver=0.7.2
pkgrel=5
pkgdesc="Quantum Nature package for IBM qiskit framework"
arch=(x86_64)
url=https://github.com/qiskit-community/qiskit-nature
license=(Apache-2.0)
depends=(
python-h5py
python-numpy
python-qiskit
python-qiskit-algorithms
python-rustworkx
python-scipy
)
makedepends=(
python-build
python-installer
python-setuptools
python-wheel
)
checkdepends=(
python-ddt
python-pytest
)
source=(
$_pkgname-$pkgver.tar.gz::https://github.com/qiskit-community/$_pkgname/archive/refs/tags/$pkgver.tar.gz
fix-test-numpy.patch::https://patch-diff.githubusercontent.com/raw/qiskit-community/qiskit-nature/pull/1371.patch
)
b2sums=('413df37a8fb9d76f4284b91675e3f52d6b2dd8c0b53b67264d903c7853fb87ff3eefd7bffedc309cc0623d365cd8b41fad80f5a398e6589d943978ea27142dba'
'349b7b36a627ca1e1c62322abcd76f636824e094cf9eac8a77a37886dac7dd911b4792d77e7fb1563c2faf6dd65b27b907b479d6099a5c490b47a26e3e40c23a')
prepare() {
# https://github.com/qiskit-community/qiskit-nature/issues/1370
patch -Np 1 -d $_pkgname-$pkgver -i ../fix-test-numpy.patch
}
build() {
cd $_pkgname-$pkgver
python -m build --wheel --no-isolation
}
check() {
cd $_pkgname-$pkgver
local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
python -m installer --destdir=../test_dir dist/*.whl
PYTHONPATH="$PWD/../test_dir/$_site_packages" pytest
}
package() {
cd $_pkgname-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
}
|