blob: c28e906b053b8249f56a37b248af2115c0f9de95 (
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.2
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=('b6af8c9db61e39b7a51cb1a27727ee9abfa62fe8c12aeb543217b923e2a80c2373b9777051144a3451abf44288fb10fd6d4333513b3e3a7617f34210bc509676')
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}"
}
|