blob: 40e4ddcf12b825fae533c8a12e0a773b2c92bfed (
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
|
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
_base=trame-client
pkgname=python-${_base}
pkgdesc="Internal client of trame"
pkgver=3.5.0
pkgrel=1
arch=(any)
url="https://github.com/Kitware/${_base}"
license=(MIT)
depends=(python)
makedepends=(python-build python-installer python-setuptools python-wheel nodejs npm)
checkdepends=(python-pytest-xprocess python-pillow python-pixelmatch python-seleniumbase)
source=(${_base}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz)
sha512sums=('24092f357a47ff1cc39974703a900701b119ceda75339571501d6be1cae83297a4d3d60618a98e5e57d4fa62e6b78aee90098ebae081ce2f4dc9661d9ad85c3e')
prepare() {
sed -i 's/^include/#include/' ${_base}-${pkgver}/MANIFEST.in
}
build() {
cd ${srcdir}/${_base}-${pkgver}/vue2-app
npm install
npm run build
cd ${srcdir}/${_base}-${pkgver}/vue3-app
npm install
npm run build
cd ${srcdir}/${_base}-${pkgver}
python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd ${_base}-${pkgver}
python -m venv --system-site-packages test-env
test-env/bin/python -m installer dist/*.whl
test-env/bin/python -m pytest tests/test_import.py
}
package() {
cd ${_base}-${pkgver}
PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
|