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

Filipe Laíns ffy00 at archlinux.org
Mon Mar 18 22:39:24 UTC 2019


    Date: Monday, March 18, 2019 @ 22:39:24
  Author: ffy00
Revision: 442513

upgpkg: python-contextlib2 0.5.5-3

Added:
  python-contextlib2/trunk/PKGBUILD

----------+
 PKGBUILD |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

Added: PKGBUILD
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2019-03-18 22:39:24 UTC (rev 442513)
@@ -0,0 +1,48 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Maintainer: Filipe Laíns (FFY00) <lains at archlinux.org>
+# Contributor: Cedric Girard <girard.cedric at gmail.com>
+
+_pkgname=contextlib2
+pkgbase=python-$_pkgname
+pkgname=(python-$_pkgname python2-$_pkgname)
+pkgver=0.5.5
+pkgrel=3
+pkgdesc="Backport of the standard library's contextlib module to earlier Python versions"
+arch=('any')
+url='https://github.com/jazzband/contextlib2'
+license=('PSF')
+makedepends=('python-setuptools' 'python2-setuptools')
+source=("$pkgname-$pkgver::$url/archive/v$pkgver.tar.gz")
+sha512sums=('9e995dbb8b524233e22c460dca97c252313492ccf821f04e84f48e8975a8aa79cbfe7f3e8ad5135e19352b3981536a01effbff7e39ff1d76af41450faa91b0a1')
+
+prepare() {
+  cp -a $_pkgname-$pkgver{,-py2}
+}
+
+build() {
+  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
+}
+
+package_python-contextlib2() {
+  depends=('python')
+  cd $_pkgname-$pkgver
+
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+
+  install -Dm 644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-contextlib2() {
+  depends=('python2')
+  cd $_pkgname-$pkgver-py2
+
+  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
+
+  install -Dm 644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}



More information about the arch-commits mailing list