[arch-commits] Commit in (4 files)

Levente Polyak anthraxx at archlinux.org
Mon Nov 6 19:35:48 UTC 2017


    Date: Monday, November 6, 2017 @ 19:35:45
  Author: anthraxx
Revision: 265602

addpkg: python-pbkdf2 1.3-3

Added:
  python-pbkdf2/
  python-pbkdf2/repos/
  python-pbkdf2/trunk/
  python-pbkdf2/trunk/PKGBUILD

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

Added: python-pbkdf2/trunk/PKGBUILD
===================================================================
--- python-pbkdf2/trunk/PKGBUILD	                        (rev 0)
+++ python-pbkdf2/trunk/PKGBUILD	2017-11-06 19:35:45 UTC (rev 265602)
@@ -0,0 +1,66 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Timothy Redaelli <timothy.redaelli at gmail.com>
+# Contributor: Hilton Medeiros <medeiros.hilton at gmail.com>
+
+pkgbase=python-pbkdf2
+pkgname=('python-pbkdf2' 'python2-pbkdf2')
+pkgver=1.3
+pkgrel=3
+pkgdesc='Password-based key derivation function PBKDF2'
+url='https://www.dlitz.net/software/python-pbkdf2/'
+arch=('any')
+license=('MIT')
+makedepends=('python' 'python-setuptools' 'python-crypto'
+             'python2' 'python2-setuptools' 'python2-crypto')
+checkdepends=('python2-pytest' 'python-pytest')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/dlitz/python-pbkdf2/archive/v${pkgver}.tar.gz)
+sha256sums=('f35d36855c082c9cc258da555ea513c800b125c6b5f2fbf9cc4a45655579de5c')
+sha512sums=('642372615a2ffc9cf352805789f836c42763c49cbf113d64524a55c6ff8a09f0fda36c92713387f27c2f6a2950ce89ae04dc9f92495cba904400685b148f947e')
+
+prepare() {
+  cp -a ${pkgbase}-${pkgver}{,-py2}
+  cd ${pkgbase}-${pkgver}-py2
+  find . -type f -name "*.py" -exec sed -i 's#/usr/bin/python#/usr/bin/env python2#g' {} +
+}
+
+build() {
+  msg2 "Building python..."
+  (cd ${pkgbase}-${pkgver}
+    python setup.py build
+  )
+  msg2 "Building python2..."
+  (cd ${pkgbase}-${pkgver}-py2
+    python2 setup.py build
+  )
+}
+
+check() {
+  msg2 "Checking python..."
+  (cd ${pkgbase}-${pkgver}
+    py.test
+  )
+  msg2 "Checking python2..."
+  (cd ${pkgbase}-${pkgver}-py2
+    py.test2
+  )
+}
+
+package_python-pbkdf2() {
+  depends=('python')
+  optdepends=('python-crypto: to make use of PyCrypto`s HMAC and SHA')
+  cd ${pkgbase}-${pkgver}
+  python setup.py install --prefix=/usr --root="${pkgdir}" -O1 --skip-build
+  install -Dm 644 README.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -Dm 644 README.txt -t "${pkgdir}/usr/share/doc/${pkgname}"
+}
+
+package_python2-pbkdf2() {
+  depends=('python2')
+  optdepends=('python2-crypto: to make use of PyCrypto`s HMAC and SHA')
+  cd ${pkgbase}-${pkgver}-py2
+  python2 setup.py install --prefix=/usr --root="${pkgdir}" -O1 --skip-build
+  install -Dm 644 README.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -Dm 644 README.txt -t "${pkgdir}/usr/share/doc/${pkgname}"
+}
+
+# vim: ts=2 sw=2 et:


More information about the arch-commits mailing list