summaryrefslogtreecommitdiff
path: root/staging/twisted
diff options
context:
space:
mode:
Diffstat (limited to 'staging/twisted')
-rw-r--r--staging/twisted/PKGBUILD37
-rw-r--r--staging/twisted/twisted.install11
2 files changed, 48 insertions, 0 deletions
diff --git a/staging/twisted/PKGBUILD b/staging/twisted/PKGBUILD
new file mode 100644
index 000000000..35bf73958
--- /dev/null
+++ b/staging/twisted/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 168774 2012-10-15 21:19:51Z eric $
+# Maintainer : Ionut Biru <ibiru@archlinux.org>
+# Contributor: Juergen Hoetzel <juergen@archlinux.org>
+# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
+
+pkgname=twisted
+pkgver=12.2.0
+pkgrel=2
+pkgdesc="Asynchronous networking framework written in Python."
+arch=('i686' 'x86_64')
+url="http://twistedmatrix.com/"
+license=('MIT')
+depends=('python2-crypto' 'python2-zope-interface')
+optdepends=('python2-pyopenssl'
+ 'python2-soappy: for twisted.web.soap'
+ 'python2-pyasn1: for using conch'
+ 'pygtk: for using manhole'
+ 'tk: for using tkconch')
+install=twisted.install
+source=(http://twistedmatrix.com/Releases/Twisted/${pkgver%.*}/Twisted-$pkgver.tar.bz2)
+sha1sums=('c51834c1270e7a4bb0de9190056e4317413920f9')
+
+build() {
+ cd "$srcdir/Twisted-$pkgver"
+ python2 setup.py build
+}
+
+package() {
+ cd "$srcdir/Twisted-$pkgver"
+ python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ sed -i 's:^#!.*bin.*python:#!/usr/bin/python2:' \
+ "$pkgdir"/usr/lib/python2.7/site-packages/twisted/trial/test/scripttest.py \
+ "$pkgdir"/usr/lib/python2.7/site-packages/twisted/mail/test/pop3testserver.py \
+ "$pkgdir"/usr/lib/python2.7/site-packages/twisted/python/test/pullpipe.py
+}
diff --git a/staging/twisted/twisted.install b/staging/twisted/twisted.install
new file mode 100644
index 000000000..8e93ffd3c
--- /dev/null
+++ b/staging/twisted/twisted.install
@@ -0,0 +1,11 @@
+post_install() {
+ python2 -c 'from twisted.plugin import IPlugin, getPlugins; list(getPlugins(IPlugin))' >/dev/null 2>&1 || return 1
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ find /usr/lib/python2.7/site-packages/twisted/plugins -name dropin.cache | xargs -r rm -f
+}