Date: Tuesday, February 25, 2020 @ 10:38:44
  Author: felixonmars
Revision: 580988

upgpkg: python-testtools 2.3.0-7: remove python2 sibling

Modified:
  python-testtools/trunk/PKGBUILD

----------+
 PKGBUILD |   37 +++++++++----------------------------
 1 file changed, 9 insertions(+), 28 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2020-02-25 10:37:01 UTC (rev 580987)
+++ PKGBUILD    2020-02-25 10:38:44 UTC (rev 580988)
@@ -1,26 +1,23 @@
 # Maintainer: Felix Yan <felixonm...@archlinux.org>
 
-pkgbase=python-testtools
-pkgname=('python-testtools' 'python2-testtools')
+pkgname=python-testtools
 pkgver=2.3.0
-pkgrel=6
+pkgrel=7
 pkgdesc="Extensions to the Python standard library unit testing framework"
 arch=('any')
 license=('MIT')
 url="https://github.com/testing-cabal/testtools";
-makedepends=('python-setuptools' 'python2-setuptools' 'python-pyrsistent' 
'python2-pyrsistent'
-             'git' 'python-pbr' 'python2-pbr' 'python-extras' 'python2-extras'
-             'python-fixtures' 'python2-fixtures' 'python-mimeparse' 
'python2-mimeparse'
-             'python2-unittest2' 'python2-traceback2')
+depends=('python-pbr' 'python-extras' 'python-fixtures' 'python-pyrsistent' 
'python-mimeparse')
+makedepends=('python-setuptools')
 checkdepends=('python-testscenarios')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/testing-cabal/testtools/archive/$pkgver.tar.gz";
+source=("$pkgname-$pkgver.tar.gz::https://github.com/testing-cabal/testtools/archive/$pkgver.tar.gz";
         'python-3.7.patch')
 
sha512sums=('7c3b9e180c5f22d613763446525fcb3f7f260d79bc875669134c3077af0e0d3e101863429e0469ffcb26fd0755b2c915454abc949be864639a2faa9cf5024c62'
             
'12430f9b813fea33b4e7530d446f5eebfe65785f4132b8732f771cbe72ed23bfdf3841db0a85ffab58f518bccbb5cf2711b62021b9ee294a9efc28b5df59d411')
 
+export PBR_VERSION=$pkgver
+
 prepare() {
-  cp -a testtools-$pkgver{,-py2}
-
   patch -Np1 -d testtools-$pkgver <python-3.7.patch
 
   # These are for python 2.x and old python 3.x only
@@ -33,16 +30,11 @@
   sed -i 's|import linecache2 as linecache|import linecache|' 
testtools-$pkgver/testtools/tests/test_compat.py
   sed -i "s|traceback = try_import('traceback2')|import traceback|" 
testtools-$pkgver/testtools/content.py
   sed -i '/traceback2/d' testtools-$pkgver/requirements.txt
-
-  export PBR_VERSION=$pkgver
 }
 
 build() {
-  cd "$srcdir"/testtools-$pkgver
+  cd testtools-$pkgver
   python setup.py build
-
-  cd "$srcdir"/testtools-$pkgver-py2
-  python2 setup.py build
 }
 
 check() {
@@ -50,19 +42,8 @@
   python -m testtools.run testtools.tests.test_suite
 }
 
-package_python-testtools() {
-  depends=('python-pbr' 'python-extras' 'python-fixtures' 'python-pyrsistent' 
'python-mimeparse')
-
+package() {
   cd testtools-$pkgver
   python setup.py install --root="$pkgdir" --optimize=1
   install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }
-
-package_python2-testtools() {
-  depends=('python2-pbr' 'python2-extras' 'python2-fixtures' 
'python2-pyrsistent'
-           'python2-mimeparse' 'python2-unittest2' 'python2-traceback2')
-
-  cd testtools-$pkgver-py2
-  python2 setup.py install --root="$pkgdir" --optimize=1
-  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}

Reply via email to