[arch-commits] Commit in (5 files)

David Runge dvzrv at archlinux.org
Sat Mar 14 20:17:31 UTC 2020


    Date: Saturday, March 14, 2020 @ 20:17:30
  Author: dvzrv
Revision: 597157

Adding python-identify as depends for python-pre-commit, a depends for molecule.

Added:
  python-identify/
  python-identify/repos/
  python-identify/trunk/
  python-identify/trunk/PKGBUILD
Deleted:
  python-identify/

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

Added: python-identify/trunk/PKGBUILD
===================================================================
--- python-identify/trunk/PKGBUILD	                        (rev 0)
+++ python-identify/trunk/PKGBUILD	2020-03-14 20:17:30 UTC (rev 597157)
@@ -0,0 +1,44 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+# Contributor: Felix Yan <felixonmars at archlinux.org>
+
+_name=identify
+pkgname=python-identify
+pkgver=1.4.11
+pkgrel=2
+pkgdesc="File identification library for Python"
+arch=('any')
+url="https://github.com/chriskuehl/identify"
+license=('MIT')
+depends=('python')
+makedepends=('python-setuptools')
+checkdepends=('python-editdistance' 'python-pytest')
+# no tests in pypi sdist tarball:
+# https://github.com/chriskuehl/identify/issues/95
+# source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
+source=("${_name}-${pkgver}.tar.gz::https://github.com/chriskuehl/${_name}/archive/v${pkgver}.tar.gz")
+sha512sums=('e28c4c9f5a9b2499def3b5ad7b29f17066a4fd29396af90d7d7d5806bfe35f078c13c3844206d0c90ec18215eef0e72f70f435b2fb48b7bf81d660d69fe5dd9e')
+
+prepare() {
+  mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  python setup.py build
+}
+
+check() {
+  cd "$pkgname-$pkgver"
+  export PYTHONPATH="build:${PYTHONPATH}"
+  pytest -v
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  python setup.py install --skip-build \
+    --optimize=1 \
+    --prefix=/usr \
+    --root="${pkgdir}"
+  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+}



More information about the arch-commits mailing list