blob: 5f95f7831cfa5da44f5108304aa41a150214b8cd (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-twisted
_pkgname=Twisted
pkgver=19.7.0
pkgrel=2
pkgdesc="Asynchronous networking framework written in Python3"
url="http://twistedmatrix.com/"
#arch="all"
license="MIT"
depends="python3 py3-cryptography py3-zope-interface py3-constantly py3-incremental py3-attrs
py3-pyhamcrest py3-hyperlink py3-automat"
makedepends="libtirpc-dev py3-setuptools python3-dev cython"
checkdepends="xvfb-run py3-appdirs tzdata"
subpackages="$pkgname-doc"
source="https://twistedmatrix.com/Releases/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.bz2
remove-locale-dependent-tests.patch
disable-failing-test.patch
"
options="!check" # FIXME: fix python 3.8 support. for example hmac.HMAC needs the digestmod arg
builddir="$srcdir"/"$_pkgname"-$pkgver
replaces="py-twisted" # Backwards compatibility
provides="py-twisted=$pkgver-r$pkgrel" # Backwards compatibility
prepare() {
default_prepare
# Remove tests that always fail due to our not-upstream testing procedure
# these tests if invoking the Twisted binary and twisted.trial tests work
rm -f src/twisted/test/test_main.py
rm $(grep -lr "Generated by Cython" .)
}
build() {
find -name '*.pyx' -exec cython3 {} \;
CFLAGS="$CFLAGS $(pkgconf --cflags libtirpc)" python3 setup.py build
}
check() {
PYTHONPATH="$(echo $PWD/build/lib.*)" xvfb-run python3 \
-c 'from twisted.scripts.trial import run; run()' twisted
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
_mans="pyhtmlizer.1 trial.1 twistd.1"
for _man in $_mans; do
install -m644 -D "$builddir"/docs/core/man/$_man \
"$pkgdir"/usr/share/man/man1/$_man
done
}
doc() {
replaces="py-twisted-doc" # Backwards compatibility
default_doc
}
sha512sums="46588008f0be63f9ec8cfb88bb81f4268e59e8dead8256c36144b521eb3e58726f4d8c9016b7157365b26929e39a3fa6ff2cc2a9f83e8cfa7f1acc43d31297c4 Twisted-19.7.0.tar.bz2
b8532d6ad572c7f13cddce35e2aa03d28b7e2b22ace7976e92e617aa26f15ea518f8cbd5efd560f841a585356323815d39257a49b39c9caae505ceff44c4435c remove-locale-dependent-tests.patch
2bacc91852875fa0b090e0a685204846485b32e3c41a4b0b933c90cf6736ba1a34bd04c3151dae256a1b2046c757985952bb050565b8dcd428199a9f7ddbcfca disable-failing-test.patch"
|