[arch-commits] Commit in python-wheezy-template/repos (2 files)

Eli Schwartz eschwartz at archlinux.org
Fri Jan 29 16:55:34 UTC 2021


    Date: Friday, January 29, 2021 @ 16:55:33
  Author: eschwartz
Revision: 835407

archrelease: copy trunk to community-x86_64

Added:
  python-wheezy-template/repos/community-x86_64/
  python-wheezy-template/repos/community-x86_64/PKGBUILD
    (from rev 835406, python-wheezy-template/trunk/PKGBUILD)

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

Copied: python-wheezy-template/repos/community-x86_64/PKGBUILD (from rev 835406, python-wheezy-template/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2021-01-29 16:55:33 UTC (rev 835407)
@@ -0,0 +1,43 @@
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+
+_pkgname=wheezy.template
+pkgname=python-wheezy-template
+pkgver=3.0.3
+pkgrel=1
+pkgdesc="lightweight template library"
+arch=('x86_64')
+url="https://github.com/akornatskyy/${_pkgname}"
+license=('MIT')
+depends=('python')
+makedepends=('python-setuptools' 'cython')
+checkdepends=('python-pytest')
+#source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
+sha256sums=('37480d916bc38b4c32c74d7cd76143e1f36c6d48ca796fcc581276f9f59be65e')
+b2sums=('6ad64816b9c5a656539333655053b43a315b67de18a5eddb7ae63406bde8754f1e15b5661f99eaab6da16ab732eb4dd4637e739c9f8b41c2f137a0aa26ebbfdf')
+
+prepare() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    # https://github.com/akornatskyy/wheezy.template/pull/33
+    sed -i 's/from mock import/from unittest.mock import/' src/wheezy/template/tests/test_loader.py
+}
+
+build() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    python setup.py build
+}
+
+check() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    PYTHONPATH="$PWD/src" pytest --import-mode=importlib
+}
+
+package() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+    install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}



More information about the arch-commits mailing list