blob: cdfe639a15b196fda8d46bf97e7e5ebdcdf4146c (
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
|
# Maintainer: Jose Riha <jose 1711 gmail com>
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
_base=textual
pkgname=python-${_base}
pkgver=0.1.18
pkgrel=1
pkgdesc="Text User Interface using Rich"
arch=(any)
url="https://github.com/Textualize/${_base}"
license=(MIT)
depends=(python-rich)
makedepends=(python-build python-install python-poetry-core)
checkdepends=(python-pytest)
source=(${_base}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz)
sha512sums=('c43f5d317f0b9e15e9e830b8baad7c4725fd05d2e7ed4908c9bad30ddc61a246d1bb31c1dcb54d391d39129d2ebbe8515fd0007a0e9f6687f88734a76223ed14')
build() {
cd ${_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 install --optimize=1 dist/*.whl
test-env/bin/python -m pytest
}
package() {
cd ${_base}-${pkgver}
python -m install --optimize=1 --destdir="${pkgdir}" dist/*.whl
# Symlink license file
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
install -d ${pkgdir}/usr/share/licenses/${pkgname}
ln -s "${site_packages}/${_base}-${pkgver}.dist-info/LICENSE" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|