blob: 2897ae876b2f3f2873abd41d57f1c3f726227dbe (
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
|
# Maintainer: Iyán Méndez Veiga <me (at) iyanmv (dot) com>
_name=qiskit-addon-cutting
pkgname=python-${_name}
pkgver=0.9.0
pkgrel=1
pkgdesc="Reduce width and depth of quantum circuits by cutting gates and wires"
arch=(any)
url=https://github.com/Qiskit/qiskit-addon-cutting
license=(Apache-2.0)
depends=(
python-numpy
python-qiskit
python-rustworkx
)
makedepends=(
python-build
python-installer
python-hatchling
)
checkdepends=(
python-ddt
python-pytest
python-qiskit-aer
python-qiskit-ibm-runtime
)
source=($_name-$pkgver.tar.gz::https://github.com/Qiskit/$_name/archive/refs/tags/$pkgver.tar.gz)
b2sums=('362d427cfca8febc64337a458e8cae68e30cdf437ed03dacb56790bebe1d72b3a5effb466feead72ecbfc8bb7557664d77dfa42df573a68a90432a7afc1c86ec')
build() {
cd $_name-$pkgver
python -m build --wheel --no-isolation
}
check() {
cd $_name-$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_addon_cutting
PYTHONPATH="$PWD/../test_dir/usr/lib/python$python_version/site-packages" pytest test
}
package() {
cd $_name-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -D -m644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
|