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

Evangelos Foutras foutrelis at archlinux.org
Mon Jul 23 07:57:51 UTC 2018


    Date: Monday, July 23, 2018 @ 07:57:50
  Author: foutrelis
Revision: 329381

Python 3.7 rebuild + new upstream release

Modified:
  twisted/trunk/PKGBUILD

----------+
 PKGBUILD |   29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-07-23 07:02:47 UTC (rev 329380)
+++ PKGBUILD	2018-07-23 07:57:50 UTC (rev 329381)
@@ -6,25 +6,30 @@
 
 pkgbase=twisted
 pkgname=(python-twisted python2-twisted)
-pkgver=18.4.0
+pkgver=18.7.0
+_commit=ee535041258e7ef0b3223d2e12cd9aaa0bc2289f
 pkgrel=1
 pkgdesc="Asynchronous networking framework written in Python"
 arch=('x86_64')
-url="http://twistedmatrix.com/"
+url="https://twistedmatrix.com/"
 license=('MIT')
 makedepends=('python-zope-interface' 'python2-zope-interface' 'python-setuptools'
              'python2-setuptools' 'python-service-identity' 'python2-service-identity'
              'python-incremental' 'python2-incremental' 'python-constantly' 'python2-constantly'
-             'python-automat' 'python2-automat' 'python-hyperlink' 'python2-hyperlink')
+             'python-automat' 'python2-automat' 'python-hyperlink' 'python2-hyperlink'
+             'python-attrs' 'python2-attrs' 'python-pyhamcrest' 'python2-pyhamcrest')
 checkdepends=('subversion' 'python2-sphinx' 'pygtk' 'xorg-server-xvfb' 'tk' 'openssh' 'gtk3'
               'python-gobject' 'python2-gobject' 'python-gobject2' 'python2-gobject2'
               'python2-soappy' 'python-subunit' 'python2-subunit' 'python-h2' 'python2-h2'
               'python-priority' 'python2-priority' 'python-cryptography' 'python2-cryptography'
               'python-idna' 'python2-idna' 'python-pyserial' 'python2-pyserial')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/twisted/twisted/archive/twisted-$pkgver.tar.gz")
-sha512sums=('229b4d12f8c2d6592644690cfec140e6a82a662433af8eb00c7c276e3bf5ec8894e722974b0e5c4d0d122d6de17e984c4cc511d67714ce74e5e18187b92cfe7b')
+#source=("$pkgbase-$pkgver.tar.gz::https://github.com/twisted/twisted/archive/twisted-$pkgver.tar.gz")
+makedepends+=('git')
+source=(git+https://github.com/twisted/twisted#commit=$_commit)
+sha512sums=('SKIP')
 
 prepare() {
+  mv twisted twisted-twisted-$pkgver
   cp -a twisted-twisted-$pkgver{,-py2}
 
   sed -i 's:^#!.*bin.*python:#!/usr/bin/python2:' \
@@ -43,16 +48,18 @@
 check() {
   export LC_CTYPE=en_US.UTF-8
 
-  cd "$srcdir"/twisted-twisted-$pkgver
-  PYTHONPATH="$PWD/build/lib.linux-$CARCH-3.6:$PYTHONPATH" xvfb-run python -m twisted.trial twisted
+  # do glob expansion in variable assignment
+  pythonpaths=("$srcdir/twisted-twisted-$pkgver/build/lib.linux-$CARCH"-3*
+               "$srcdir/twisted-twisted-$pkgver-py2/build/lib.linux-$CARCH-"2*)
 
-  cd "$srcdir"/twisted-twisted-$pkgver-py2
-  PYTHONPATH="$PWD/build/lib.linux-$CARCH-2.7:$PYTHONPATH" xvfb-run python2 -m twisted.trial twisted || warning "Tests failed"
+  # tests use the underlying function from the 'python -m twisted.trial' module, to prevent loading system entry points
+  PYTHONPATH="${pythonpaths[0]}" xvfb-run python -c 'from twisted.scripts.trial import run; run()' twisted || warning "Tests failed"
+  PYTHONPATH="${pythonpaths[1]}" xvfb-run python2 -c 'from twisted.scripts.trial import run; run()' twisted || warning "Tests failed"
 }
 
 package_python-twisted() {
   depends=('python-zope-interface' 'python-incremental' 'python-constantly' 'python-automat'
-           'python-hyperlink')
+           'python-hyperlink' 'python-attrs' 'python-pyhamcrest')
   optdepends=('python-pyopenssl: for TLS client hostname verification'
               'python-service-identity: for TLS client hostname verification'
               'python-idna: for TLS client hostname verification'
@@ -78,7 +85,7 @@
 
 package_python2-twisted() {
   depends=('python2-zope-interface' 'python2-incremental' 'python2-constantly' 'python2-automat'
-           'python2-hyperlink')
+           'python2-hyperlink' 'python-attrs' 'python-pyhamcrest')
   optdepends=('python2-pyopenssl: for TLS client hostname verification'
               'python2-service-identity: for TLS client hostname verification'
               'python2-idna: for TLS client hostname verification'



More information about the arch-commits mailing list