summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLingMan2021-06-27 16:53:31 +0200
committerLingMan2021-06-27 16:56:24 +0200
commit79176442ec83fe5c6767a3798ecdf77762fc3d4c (patch)
tree19d36a257243c65e784ca12241d6d93cc7595b32
downloadaur-79176442ec83fe5c6767a3798ecdf77762fc3d4c.tar.gz
AUR submission after python2 support was dropped from the main repos in
https://github.com/archlinux/svntogit-packages/commit/dceb29598f1049b1f7b937301692ef9e3be1fe26 Note that 20.3.0 is the last version supporting Python 2, so this will not be updated to Twisted 21.2.0+
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD48
2 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..09d0715d7993
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = python2-twisted
+ pkgdesc = Asynchronous networking framework written in Python (20.3.0 is the last version supporting Python 2)
+ pkgver = 20.3.0
+ pkgrel = 4
+ url = https://twistedmatrix.com/
+ arch = x86_64
+ license = MIT
+ depends = python-twisted
+ depends = python2-zope-interface
+ depends = python2-setuptools
+ depends = python2-service-identity
+ depends = python2-incremental
+ depends = python2-constantly
+ depends = python2-automat
+ depends = python2-hyperlink
+ depends = python2-attrs
+ depends = python2-pyhamcrest
+ optdepends = python2-pyopenssl: for TLS client hostname verification
+ optdepends = python2-idna: for TLS client hostname verification
+ optdepends = python2-cryptography: for using conch
+ optdepends = python2-pyasn1: for using conch
+ optdepends = python2-appdirs: for using conch
+ optdepends = python2-bcrypt: for using conch
+ optdepends = python2-priority: for http2 support
+ optdepends = python2-pyserial: for serial support
+ optdepends = python2-soappy: for twisted.web.soap
+ optdepends = tk: for using tkconch
+ source = python2-twisted-20.3.0.tar.gz::https://github.com/twisted/twisted/archive/twisted-20.3.0.tar.gz
+ sha512sums = 72307a0b9165d5f6b31f5563f4f76f9c759349d55f6dcaf43358eab3e8f1b2065e0b12c8ac43f14061ee17cb2d9b27f463bcb9e642750fb8e6e510e403bd2b06
+
+pkgname = python2-twisted
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ababc77efc2d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+
+pkgname=python2-twisted
+# Do not update. This is the last twisted version supporting Python2.
+pkgver=20.3.0
+pkgrel=4
+pkgdesc="Asynchronous networking framework written in Python (20.3.0 is the last version supporting Python 2)"
+arch=('x86_64')
+url="https://twistedmatrix.com/"
+license=('MIT')
+depends=('python-twisted' 'python2-zope-interface' 'python2-setuptools' 'python2-service-identity'
+ 'python2-incremental' 'python2-constantly' 'python2-automat' 'python2-hyperlink'
+ 'python2-attrs' 'python2-pyhamcrest')
+optdepends=('python2-pyopenssl: for TLS client hostname verification'
+ 'python2-idna: for TLS client hostname verification'
+ 'python2-cryptography: for using conch'
+ 'python2-pyasn1: for using conch'
+ 'python2-appdirs: for using conch'
+ 'python2-bcrypt: for using conch'
+ 'python2-priority: for http2 support'
+ 'python2-pyserial: for serial support'
+ 'python2-soappy: for twisted.web.soap'
+ 'tk: for using tkconch')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/twisted/twisted/archive/twisted-$pkgver.tar.gz")
+sha512sums=('72307a0b9165d5f6b31f5563f4f76f9c759349d55f6dcaf43358eab3e8f1b2065e0b12c8ac43f14061ee17cb2d9b27f463bcb9e642750fb8e6e510e403bd2b06')
+
+prepare() {
+ sed -i 's:^#!.*bin.*python:#!/usr/bin/python2:' \
+ twisted-twisted-$pkgver/src/twisted/mail/test/pop3testserver.py \
+ twisted-twisted-$pkgver/src/twisted/trial/test/scripttest.py
+}
+
+build() {
+ cd "$srcdir"/twisted-twisted-$pkgver
+ python2 setup.py build
+}
+
+package() {
+ cd twisted-twisted-$pkgver
+ python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+
+ # python-twisted already provides these command line tools.
+ # Let's depend on python-twisted and rename the tools here so we don't conflict.
+ for name in trial twistd twist ckeygen cftp conch pyhtmlizer tkconch mailmail; do
+ mv "$pkgdir"/usr/bin/${name}{,2}
+ done
+
+ install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+}