summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 81e67fe8cb76c8b80415b8cc773d21028b1e0418 (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
# Maintainer: Daniel Peukert <daniel@peukert.cc>
_projectname='py_cui'
pkgname="python-$_projectname"
pkgver='0.1.6'
pkgrel='2'
pkgdesc='Python library for creating all-ascii CUI/TUI interfaces with pre-built widgets'
arch=('any')
url="https://github.com/jwlodek/$_projectname"
license=('BSD-3-Clause')
depends=('python>=3.6.0')
makedepends=('python-setuptools' 'python-wheel')
checkdepends=('python-pytest')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('95cf3df28525d7429e2e0fb2bcdce607d3ae2f3ea24d85112e8e4f38fb7944bcab9f992c55b093c23a154f4ae4aa50bcb20ce0377f2af1830397e2effa10eb1e')

_sourcedirectory="$_projectname-$pkgver"

build() {
	cd "$srcdir/$_sourcedirectory/"
	python setup.py build
}

check() {
	cd "$srcdir/$_sourcedirectory/"

	# Run tests
	pytest

	# Verify that the basic functionality works
	printf 'q' | python -B 'examples/hello_py_cui.py'
}

package() {
	cd "$srcdir/$_sourcedirectory/"
	python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
	install -Dm644 'LICENSE' "$pkgdir/usr/share/licenses/$pkgname/BSD-3-Clause"
}