[arch-commits] Commit in twisted/trunk (3 files)

Felix Yan fyan at nymeria.archlinux.org
Sun May 18 15:45:29 UTC 2014


    Date: Sunday, May 18, 2014 @ 17:45:28
  Author: fyan
Revision: 213061

upgpkg: twisted 14.0.0-1

- upstream new major release
- rename old twisted package to python2-twisted, and add its python 3 counterpart
- user intervention required because of file conflicts (--force would do it)
- add tests (not passing, already opened upstream but report at http://twistedmatrix.com/trac/ticket/7370 )

Added:
  twisted/trunk/python2-twisted.install
    (from rev 213053, twisted/trunk/twisted.install)
Modified:
  twisted/trunk/PKGBUILD
Deleted:
  twisted/trunk/twisted.install

-------------------------+
 PKGBUILD                |   76 ++++++++++++++++++++++++++++++++--------------
 python2-twisted.install |    3 +
 twisted.install         |   11 ------
 3 files changed, 57 insertions(+), 33 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-05-18 14:56:23 UTC (rev 213060)
+++ PKGBUILD	2014-05-18 15:45:28 UTC (rev 213061)
@@ -3,38 +3,70 @@
 # Contributor: Juergen Hoetzel <juergen at archlinux.org>
 # Contributor:  Douglas Soares de Andrade <douglas at archlinux.org>
 
-pkgname=twisted
-pkgver=13.2.0
+pkgbase=twisted
+pkgname=(python-twisted python2-twisted)
+pkgver=14.0.0
 pkgrel=1
 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=('e1d43645fd3d84dc2867f36b60d2e469a71eb01d')
+makedepends=('python-crypto' 'python2-crypto' 'python-zope-interface' 'python2-zope-interface'
+             'python-setuptools' 'python2-setuptools' 'python-service-identity' 'python2-service-identity')
+source=("http://twistedmatrix.com/Releases/Twisted/${pkgver%.*}/Twisted-$pkgver.tar.bz2")
+sha1sums=('a90fae98072f8e28b9459875ce9b77f5524bbc48')
 
 prepare() {
-    cd "Twisted-$pkgver"
-    sed -i 's:^#!.*bin.*python:#!/usr/bin/python2:' \
-      twisted/python/test/pullpipe.py \
-      twisted/mail/test/pop3testserver.py \
-      twisted/trial/test/scripttest.py
+  cp -a "Twisted-$pkgver"{,-py2}
+
+  cd "Twisted-$pkgver-py2"
+  sed -i 's:^#!.*bin.*python:#!/usr/bin/python2:' \
+    twisted/python/test/pullpipe.py \
+    twisted/mail/test/pop3testserver.py \
+    twisted/trial/test/scripttest.py
 }
 
 build() {
-    cd "Twisted-$pkgver"
-    python2 setup.py build
+  cd "$srcdir/Twisted-$pkgver"
+  python3 setup.py build
+
+  cd "$srcdir/Twisted-$pkgver-py2"
+  python2 setup.py build
 }
 
-package() {
-    cd "Twisted-$pkgver"
-    python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
-    install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+check() {
+  cd "$srcdir/Twisted-$pkgver"
+  #python bin/trial twisted
+
+  cd "$srcdir/Twisted-$pkgver-py2"
+  python2 bin/trial twisted || warning "Tests failed"
 }
+
+package_python-twisted() {
+  depends=('python-crypto' 'python-zope-interface')
+  optdepends=('python-pyopenssl'
+              'python-service-identity: for TLS client hostname verification'
+              'python-pyasn1: for using conch'
+              'tk: for using tkconch')
+
+  cd "Twisted-$pkgver"
+  python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_python2-twisted() {
+  depends=('python2-crypto' 'python2-zope-interface')
+  optdepends=('python2-pyopenssl'
+              'python2-service-identity: for TLS client hostname verification'
+              'python2-soappy: for twisted.web.soap'
+              'python2-pyasn1: for using conch'
+              'pygtk: for using manhole'
+              'tk: for using tkconch')
+  provides=("twisted=$pkgver")
+  conflicts=('twisted<14.0.0')
+  replaces=('twisted<14.0.0')
+
+  cd "Twisted-$pkgver-py2"
+  python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}

Copied: twisted/trunk/python2-twisted.install (from rev 213053, twisted/trunk/twisted.install)
===================================================================
--- python2-twisted.install	                        (rev 0)
+++ python2-twisted.install	2014-05-18 15:45:28 UTC (rev 213061)
@@ -0,0 +1,3 @@
+pre_install() {
+  rm -f /usr/lib/python2.7/site-packages/twisted/plugins/dropin.cache
+}

Deleted: twisted.install
===================================================================
--- twisted.install	2014-05-18 14:56:23 UTC (rev 213060)
+++ twisted.install	2014-05-18 15:45:28 UTC (rev 213061)
@@ -1,11 +0,0 @@
-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
-}




More information about the arch-commits mailing list