blob: 1d842ee180eb87b1cc6de3f8ca71d5458e282f0a (
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
|
# Maintainer: Iyán Méndez Veiga <me (at) iyanmv (dot) com>
_pkgname=qiskit-aer
pkgname=python-${_pkgname}
pkgver=0.11.0
pkgrel=3
pkgdesc="A high performance simulator for quantum circuits that includes noise models"
arch=('x86_64')
url="https://github.com/Qiskit/qiskit-aer"
license=('Apache')
depends=(
'cython'
'muparserx'
'nlohmann-json'
'python-numpy'
'python-qiskit-terra'
'python-scipy'
)
optdepends=(
'openmp: parallelization with OpenMP'
'python-dask: parallel computing with task scheduling'
'python-distributed: distributed task scheduler for Dask'
)
makedepends=(
'cmake'
'gcc-fortran'
'lapack'
'ninja'
'openblas-lapack'
'pybind11'
'python-build'
'python-installer'
'python-scikit-build'
'python-setuptools'
'python-wheel'
'spdlog'
)
source=(
"${_pkgname}-${pkgver}.tar.gz::https://github.com/Qiskit/${_pkgname}/archive/${pkgver}.tar.gz"
"fix.patch"
)
b2sums=(
'1d48de7ef363475a09d145299de7a5a44417ab810c8821fe6ac7462c3b70004f7fb1a2e85a508f1bc8cd08e989918dc92105ab97ee94ab924fa6d9d386508894'
'4b7763d6b5802f3e1275d760e84b323b4e786c6376615a0cfb440a3fdb1f53ee9f03eea6ed6e23ba245d1f159ecf1b10287b8aac65db76804d4aefb56f55c58e'
)
prepare() {
cd "${srcdir}/${_pkgname}-${pkgver}"
patch --forward --strip=1 --input="${srcdir}/fix.patch"
}
build() {
cd "${srcdir}/${_pkgname}-${pkgver}"
DISABLE_CONAN=1 python -m build --wheel --no-isolation
#python setup.py bdist_wheel
}
package() {
cd "${srcdir}/${_pkgname}-${pkgver}"
python -m installer --destdir="$pkgdir" dist/*.whl
# This deletes all folders except /usr/lib/python3.10/site-packages/qiskit/
# See https://github.com/Qiskit/qiskit-aer/issues/1457
find "${pkgdir}/usr" -mindepth 1 -maxdepth 1 -not -name lib -exec rm -rf '{}' \;
install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|