[arch-commits] Commit in python-keyrings-alt/trunk (PKGBUILD)
Filipe Laíns
ffy00 at archlinux.org
Mon Aug 20 22:37:14 UTC 2018
Date: Monday, August 20, 2018 @ 22:37:14
Author: ffy00
Revision: 372929
make this a split package and also provide python2-keyrings-alt
Modified:
python-keyrings-alt/trunk/PKGBUILD
----------+
PKGBUILD | 65 +++++++++++++++++++++++++++++++++++++++++++------------------
1 file changed, 46 insertions(+), 19 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-08-20 22:14:04 UTC (rev 372928)
+++ PKGBUILD 2018-08-20 22:37:14 UTC (rev 372929)
@@ -1,5 +1,6 @@
# $Id$
# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Maintainer: Filipe Laíns (FFY00) <lains at archlinux.org>
# Contributor: Johannes Dewender arch at JonnyJD dot net
# Contributor: Ivan Sichmann Freitas <ivansichfreitas at gmail.com>
# Contributor: Brice Maron <brice at bmaron.net>
@@ -6,23 +7,21 @@
# Contributor: Nuno Araujo <nuno.araujo at russo79.com>
# Contributor: Steven Allen <steven {at} stebalien {dot} com>
-pkgname=python-keyrings-alt
+pkgbase=python-keyrings-alt
+_pkgname=keyrings.alt
+pkgname=(python-keyrings-alt python2-keyrings-alt)
epoch=1
pkgver=3.1
-pkgrel=2
+pkgrel=3
pkgdesc="Alternate keyring implementations"
arch=('any')
-url="https://pypi.org/project/keyrings.alt/"
+url="https://github.com/jaraco/keyrings.alt"
license=('MIT')
-depends=('python-keyring')
-optdepends=('libgnome-keyring: GNOME Integration'
- 'python-gobject: GNOME Integration'
- 'python-fs'
- 'python-crypto: Encrypted file storage')
-makedepends=('python-setuptools_scm')
-checkdepends=('python-pycryptodome' 'libgnome-keyring' 'python-gobject' 'python-pytest-flake8'
- 'python-pytest-runner') # 'python-fs'
-source=("$pkgname-$pkgver.tar.gz::https://github.com/jaraco/keyrings.alt/archive/$pkgver.tar.gz")
+makedepends=('python-setuptools_scm' 'python2-setuptools')
+checkdepends=('libgnome-keyring' 'python2-backports.unittest_mock'
+ 'python-pycryptodome' 'python-gobject' 'python-pytest-flake8' 'python-pytest-runner' 'python-keyring'
+ 'python2-pycryptodome' 'python2-gobject' 'python2-pytest-flake8' 'python2-pytest-runner' 'python2-keyring')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha512sums=('29a552f526d33cabf9646c7c51236c74cbccc6a3f650d6ccec6d5beaa48c065dec7438debb0f2d2d6a48611590f6767ee442fb9e5a597bf428a70652ae79dab5')
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
@@ -30,23 +29,51 @@
prepare() {
echo -e '\nflake8-ignore = W191 W503 W504' >> keyrings.alt-$pkgver/pytest.ini
- cp -a keyrings.alt-$pkgver{,-py2}
+ cp -a $_pkgname-$pkgver{,-py2}
}
build() {
- cd keyrings.alt-$pkgver
+ echo "Building python-$_pkgname $pkgver"
+ cd "$srcdir"/$_pkgname-$pkgver
python setup.py build
+
+ echo "Building python2-$_pkgname $pkgver"
+ cd "$srcdir"/$_pkgname-$pkgver-py2
+ python2 setup.py build
}
check() {
- cd keyrings.alt-$pkgver
+ echo "Running tests on python-$_pkgname $pkgver"
+ cd "$srcdir"/$_pkgname-$pkgver
python setup.py pytest
+
+ echo "Running tests on python2-$_pkgname $pkgver"
+ cd "$srcdir"/$_pkgname-$pkgver-py2
+ python2 setup.py pytest
}
-package() {
- cd keyrings.alt-$pkgver
- python setup.py install --root="$pkgdir" --optimize=1
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+package_python-keyrings-alt() {
+ depends=('python-keyring')
+ optdepends=('libgnome-keyring: GNOME Integration'
+ 'python-gobject: GNOME Integration'
+ 'python-fs'
+ 'python-crypto: Encrypted file storage')
+ 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-keyrings-alt() {
+ depends=('python2-keyring')
+ optdepends=('libgnome-keyring: GNOME Integration'
+ 'python2-gobject: GNOME Integration'
+ 'python2-fs'
+ 'python2-crypto: Encrypted file storage')
+ cd $_pkgname-$pkgver-py2
+
+ python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
# vim:set ts=2 sw=2 et:
More information about the arch-commits
mailing list