blob: da382b29eef92dcae727dd299ee02a81f14aedff (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Maintainer: Iyán Méndez Veiga <me (at) iyanmv (dot) com>
_pkgname=qiskit
pkgname=python-${_pkgname}
pkgver=1.3.2
pkgrel=3
epoch=1
pkgdesc="An open-source SDK for working with (IBM) quantum computers"
arch=(x86_64)
url=https://github.com/Qiskit/qiskit
license=(Apache-2.0)
conflicts=(python-qiskit-terra)
depends=(
python-dateutil
python-dill
python-numpy
python-rustworkx
python-scipy
python-stevedore
python-symengine
python-sympy
)
optdepends=(
'ipython: interactivity'
'python-constraint: support for handling CSPs (Constraint Solving Problems)'
'python-cvxpy: convex optimization problems'
'python-matplotlib: plotting support'
'python-pillow: image support'
"python-pydot: Graphviz's Dot support"
'python-pylatexenc: LaTeX support emoji selector'
'python-qiskit-aer: high performance simulator for quantum circuits'
'python-qiskit-experiments: tools for building, running, and analysis of experiments on noisy quantum computers'
'python-qiskit-finance: stock/securities problems, portfolio optimizations and finance experiments'
'python-qiskit-machine-learning: sample datasets and quantum classification algorithms'
'python-qiskit-nature: ground state energy computations, excited states and dipole moments of molecules'
'python-qiskit-optimization: quantum optimization algorithms'
'python-qiskit-qasm3-import: import OpenQASM 3 files'
'python-scikit-learn: machine learning and data mining'
'python-seaborn: statistical data visualization'
'python-z3-solver: theorem prover'
)
makedepends=(
python-build
python-installer
python-setuptools
python-setuptools-rust
python-wheel
)
checkdepends=(
ipython
python-ddt
python-stestr
)
source=($_pkgname-$pkgver.tar.gz::https://github.com/Qiskit/$_pkgname/archive/$pkgver.tar.gz)
b2sums=('e2f191f3231f858ded9c389f952a2207bfea4680be13db6207e9870fb08f2015c483e3fd891a298eaa531635cb7d1027bc10952b0c471dff9b89ed524e6228a3')
build() {
cd $_pkgname-$pkgver
export CARGO_TARGET_DIR=target
python -m build --wheel --no-isolation
}
check() {
cd $_pkgname-$pkgver
local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
python -m installer --destdir=../test_dir dist/*.whl
rm -rf qiskit
PYTHONPATH="$PWD/../test_dir/usr/lib/python$python_version/site-packages" \
PYTHONWARNINGS="ignore::DeprecationWarning,ignore::PendingDeprecationWarning,ignore::RuntimeWarning" \
stestr run -d test/python -E "test_equivalence_draw"
}
package() {
cd $_pkgname-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -D -m644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
|