blob: e274974417338955e0af367f533cd72152877503 (
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
|
pkgname=python-seabreeze
pkgver=2.10.0
pkgrel=1
pkgdesc="Python module for oceanoptics spectrometers"
arch=(x86_64)
url="https://github.com/ap--/python-seabreeze"
license=(MIT)
depends=(
python-pyusb
python-numpy
libusb-compat
)
makedepends=(
python-setuptools
python-setuptools-scm
cython
python-build
python-installer
python-wheel
python-pkgconfig
)
checkdepends=(
python-pytest
)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ap--/python-seabreeze/archive/v${pkgver}.tar.gz")
sha256sums=('343683e32a49c35406373e59fab1fea367e5cdaf2e934a7e1df8c1c09a0b9952')
prepare(){
cd python-seabreeze-${pkgver}
#curl --silent https://patch-diff.githubusercontent.com/raw/ap--/python-seabreeze/pull/143.patch | patch -p1
# version it ourselves because we don't have a .git folder
echo "[metadata]" > setup.cfg
echo "version = ${pkgver}" >> setup.cfg
echo "__version__ = \"${pkgver}\"" > src/seabreeze/_version.py
sed '/use_scm_version={/,+5 d' -i setup.py
}
build(){
cd python-seabreeze-${pkgver}
python -m build --wheel --no-isolation
}
check() {
cd python-seabreeze-${pkgver}
cd src
python -m pytest ../tests
}
package() {
cd python-seabreeze-${pkgver}
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dt "${pkgdir}/etc/udev/rules.d" -m644 os_support/10-oceanoptics.rules
msg2 "You might want to run: sudo udevadm control --reload-rules"
}
|