summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 78b6950d8e406e928123f49c3ddc46b4fbf9c78b (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
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>

pkgname=python-uiutil
_name=uiutil
pkgver=1.38.0
pkgrel=1
pkgdesc="Utility module to assist creating Tk GUIs"
arch=('any')
url='https://pypi.org/project/uiutil'
license=('custom:PSF')
depends=(
	'python-attrs'
	'python-classutils'
	'python-configurationutil'
	'python-conversionutil'
	'python-fdutil'
	'python-future'
	'python-logging-helper'
	'python-pillow'
	'python-stateutil'
	'python-timingsutil')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/u/$_name/$_name-$pkgver.tar.gz")
sha256sums=('4044acd0b1eed09b582fbc86139c0544543fd86e5a1f30bd94ef46a41907d8e1')

prepare() {
	cd "$_name-$pkgver"
	sed -i "/packages=/s/()/(exclude=['*unittests*', 'docs*'])/" setup.py
}

build() {
	cd "$_name-$pkgver"
	python -m build --wheel --no-isolation
}

package() {
	cd "$_name-$pkgver"
	PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl

	local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
	install -d "$pkgdir/usr/share/licenses/$pkgname/"
	ln -s \
		"$_site/$_name-$pkgver.dist-info/LICENSE.txt" \
		"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}