blob: 503a4df33071aa4c68c4315cd7851147b92f8b14 (
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
|
# Maintainer: Iyán Méndez Veiga <me (at) iyanmv (dot) com>
_pkgname=qiskit-algorithms
pkgname=python-$_pkgname
pkgver=0.3.1
pkgrel=3
pkgdesc="A library of quantum algorithms for Qiskit"
arch=(any)
url="https://github.com/qiskit-community/qiskit-algorithms"
license=(Apache-2.0)
depends=(
python-qiskit
python-numpy
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)
b2sums=('6ea3517c51ef297faf22cce0fe23207642c3d0f13e9d97371cea56189da69ec6c6194888964511a3d734006219309cc671b3447c7929db42dc6a39eec9d94a59')
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
# test_start() from test/optimizers/test_gradient_descent.py fails due to wrongly comparing NumPy arrays
PYTHONPATH=../test_dir/$_site_packages pytest -k "not test_start"
}
package() {
cd $_pkgname-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -D -m644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
|