summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6b334e6c5309691675bd0232a4924f5ac811bc6e (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
pkgname=python-ocp_gordon
_build_hash=81a573ea8950bab0e11a416dc5426ebfcbe64cea
pkgver=0.2.0
pkgrel=1
pkgdesc="A Python library for Gordon Surface interpolation using B-splines"
arch=(x86_64)
url="https://github.com/gongfan99/ocp_gordon"
license=(Apache-2.0)
depends=(
python-ocp
python-numpy
python-scipy
)
checkdepends=(
python-pytest
)
makedepends=(
git
python-setuptools-scm
python-build
python-installer
python-wheel
)

source=("git+https://github.com/gongfan99/ocp_gordon#commit=${_build_hash}")

sha256sums=('30c2615d1f7d9d36a00a3daaffce14490c835495b5b274b9a13dee9bfc1d170f')

pkgver() {
  cd ocp_gordon
  git describe --tags | rev | cut -d- -f2- | rev | sed 's/-/.r/' | sed 's/^v//'
}

prepare() {
  cd ocp_gordon
}

build() {
  cd ocp_gordon
  python -m build --wheel --no-isolation
}

check() {
  python -m venv --without-pip --system-site-packages --clear venv
  source venv/bin/activate
  python -m installer ocp_gordon/dist/*.whl

  python -m pytest ocp_gordon/tests

  deactivate
}

package() {
  cd ocp_gordon
  python -m installer --destdir="$pkgdir" dist/*.whl
}