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

Filipe Laíns ffy00 at archlinux.org
Mon Aug 20 22:58:27 UTC 2018


    Date: Monday, August 20, 2018 @ 22:58:26
  Author: ffy00
Revision: 372933

make this a split package and also provide python2-secretstorage

Modified:
  python-secretstorage/trunk/PKGBUILD

----------+
 PKGBUILD |   53 ++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 40 insertions(+), 13 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-08-20 22:56:34 UTC (rev 372932)
+++ PKGBUILD	2018-08-20 22:58:26 UTC (rev 372933)
@@ -1,32 +1,59 @@
 # $Id$
 # Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Maintainer: Filipe Laíns (FFY00) <lains at archlinux.org>
 # Contributor: Patrice Peterson <runiq at archlinux dot us>
 # Contributor: JonnyJD <arch at JonnyJD.net>
 
-pkgname=python-secretstorage
+pkgbase=python-secretstorage
+_pkgname=SecretStorage
+pkgname=(python-secretstorage python2-secretstorage)
 pkgver=3.0.1
-pkgrel=2
+pkgrel=3
 pkgdesc="Securely store passwords and other private data using the SecretService DBus API"
 arch=('any')
-url="https://pypi.org/project/SecretStorage/"
+url="https://github.com/mitya57/secretstorage"
 license=('BSD')
-depends=('python-cryptography' 'python-jeepney')
-checkdepends=('gnome-keyring' 'xorg-server-xvfb')
-source=("https://pypi.io/packages/source/S/SecretStorage/SecretStorage-${pkgver}.tar.gz")
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('gnome-keyring' 'xorg-server-xvfb' 'python-cryptography' 'python-jeepney' 'python2-cryptography')
+source=("https://pypi.io/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
 sha512sums=('830f8de1a300d4a334ce7c2fa494ac1d8f1e36a8518f3df6df2b352ac3377bcdb84293b1c809b18bc774a61188b91f31fa30c15109b7aec180a2d1f522f2a165')
 
+prepare() {
+  cp -a $_pkgname-$pkgver{,-py2}
+}
+
 build() {
-  cd SecretStorage-$pkgver
+  echo "Building python-secretstorage $pkgver"
+  cd "$srcdir"/$_pkgname-$pkgver
   python setup.py build
+
+  echo "Building python2-secretstorage $pkgver"
+  cd "$srcdir"/$_pkgname-$pkgver-py2
+  python2 setup.py build
 }
 
 check() {
-  cd SecretStorage-$pkgver
-  dbus-launch xvfb-run -a python -m unittest discover -s tests || warning "Tests failed"
+  echo "Running tests on python-secretstorage $pkgver"
+  cd "$srcdir"/$_pkgname-$pkgver
+  dbus-launch xvfb-run -a python -m unittest discover -s tests || warning "Tests failed on python-secretstorage $pkgver"
+
+  echo "Running tests on python2-secretstorage $pkgver"
+  cd "$srcdir"/$_pkgname-$pkgver-py2
+  dbus-launch xvfb-run -a python2 -m unittest discover -s tests || warning "Tests failed on python2-secretstorage $pkgver"
 }
 
-package() {
-  cd SecretStorage-$pkgver
-  python setup.py install -O1 --root="$pkgdir"
-  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+package_python-secretstorage() {
+  depends=('python')
+  cd $_pkgname-$pkgver
+
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }
+
+package_python2-secretstorage() {
+  depends=('python2')
+  cd $_pkgname-$pkgver-py2
+
+  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
+  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}



More information about the arch-commits mailing list