[arch-commits] Commit in (4 files)

David Runge dvzrv at archlinux.org
Tue Feb 16 18:12:44 UTC 2021


    Date: Tuesday, February 16, 2021 @ 18:12:43
  Author: dvzrv
Revision: 862318

Add python-hsluv as new optdepends entry for nikola.

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

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

Added: python-hsluv/trunk/PKGBUILD
===================================================================
--- python-hsluv/trunk/PKGBUILD	                        (rev 0)
+++ python-hsluv/trunk/PKGBUILD	2021-02-16 18:12:43 UTC (rev 862318)
@@ -0,0 +1,44 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=hsluv
+pkgname=python-hsluv
+pkgver=5.0.0
+pkgrel=2
+pkgdesc="A Python implementation of HSLuv (revision 4)"
+arch=('any')
+url="https://github.com/hsluv/hsluv-python"
+license=('MIT')
+depends=('python')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest')
+# LICENSE and tests missing on pypi.org sdist
+# https://github.com/hsluv/hsluv-python/issues/28
+# https://github.com/hsluv/hsluv-python/issues/29
+# source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${_name}/${_name}-python/archive/v${pkgver}.tar.gz")
+sha512sums=('01f880c5aebbf3c861b7dd593b0b5c215ca2223e24c80b18efa8c5457caab9fdcddae7462964d7f165bdd676022e0958ee9fc91000ae6c44a7faa0fd916a974d')
+b2sums=('1358b26195b4868c438eb90c536814008c2a0922bc1c9205f7cc0853b7c471b18d74cd5d67e0ad7185bf8d9baed55a2e58b467ea6477242175e46910fdb3084a')
+
+prepare() {
+  mv -v "${_name}-python-$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 \
+    --root="${pkgdir}"
+  install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -vDm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}



More information about the arch-commits mailing list