APKBUILD 1.89 KB
Newer Older
1
2
3
4
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-waitress
_pkgname=waitress
5
6
pkgver=1.1.0
pkgrel=0
7
8
9
pkgdesc="A Python WSGI server"
url="https://github.com/Pylons/waitress"
arch="noarch"
10
11
12
13
license="ZPL-2.1"
checkdepends="py-nose"
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3"
14
15
16
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
	waitress.initd
	waitress.confd"
17
builddir="$srcdir/$_pkgname-$pkgver"
18

19
20
21
22
23
build() {
	cd "$builddir"

	python2 setup.py build
	python3 setup.py build
24
25
}

26
27
28
29
30
check() {
	cd "$builddir"

	# XXX: Some tests fail on python2 with "No file descriptors available".
	python3 setup.py test
31
32
33
}

package() {
34
	mkdir -p "$pkgdir"/usr/bin
35
	cd "$pkgdir"
36

37
38
39
40
	ln -s waitress-serve-3 usr/bin/waitress-serve

	install -D -m 755 "$srcdir"/waitress.initd etc/init.d/waitress
	install -D -m 644 "$srcdir"/waitress.confd etc/conf.d/waitress
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
}

_py2() {
	replaces="$pkgname"
	_py python2
}

_py3() {
	_py python3
}

_py() {
	local python="$1"
	local pyver="${python#python}"
	pkgdesc="$pkgdesc (for $python)"
	depends="$python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"

	cd "$subpkgdir"
	mv usr/bin/waitress-serve usr/bin/waitress-serve-$pyver
	rm -R usr/lib/python$pyver*/site-packages/$_pkgname/tests
65
66
}

67
sha512sums="d53cf027525aec6fbd49ab78c30fef1b83d8b58c6d2cbb191d45e69141d7c31d6cd195a0924ad862a4cc42e5d098813712c568f768f51825e96fac3dd4132fbe  waitress-1.1.0.tar.gz
68
69
92c2e718e3aa3e4f5980208f482b9b0f0b3a3b6e736566635367ecaaecd86cfd98ba064c0b3d0bd33bab1acccfaf5a56557c7a162dbb86a166f277ffb2638a5c  waitress.initd
cceddb312049a1ae6141df403ee92e1276a4697a23ef8063b47721f59c508a4ded604802c6f55face5620e7be06e893ef51309ee7d8058d81858f86b2fc94cbe  waitress.confd"