[arch-commits] Commit in python-django-gravatar/repos (2 files)

David Runge dvzrv at archlinux.org
Mon Jan 13 04:02:25 UTC 2020


    Date: Monday, January 13, 2020 @ 04:02:24
  Author: dvzrv
Revision: 552284

archrelease: copy trunk to community-any

Added:
  python-django-gravatar/repos/community-any/
  python-django-gravatar/repos/community-any/PKGBUILD
    (from rev 552283, python-django-gravatar/trunk/PKGBUILD)

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

Copied: python-django-gravatar/repos/community-any/PKGBUILD (from rev 552283, python-django-gravatar/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2020-01-13 04:02:24 UTC (rev 552284)
@@ -0,0 +1,48 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=django-gravatar
+pkgname=python-django-gravatar
+pkgver=1.4.2
+pkgrel=1
+pkgdesc="Essential Gravatar support for Django"
+arch=('any')
+url="https://github.com/twaddington/django-gravatar"
+license=('MIT')
+depends=('python-django')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest')
+# sdist has no tests:
+# https://github.com/twaddington/django-gravatar/issues/32
+# source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
+source=("${_name}-${pkgver}.tar.gz::https://github.com/twaddington/${_name}/archive/${pkgver}.tar.gz"
+        "${pkgname}-1.4.2-fix_tests.patch::https://github.com/twaddington/django-gravatar/pull/33.patch")
+sha512sums=('ae83f648ab56aad5cfda37b74dc3028e805fe6e5dc93c3d7777cec3ce56164822bf7e31c1a6f78ff6faa6c610df2e3fdd538f0158353755e19150b0dea7b369e'
+            '23255dd0f07d5e1c7b3bd43aa4023ee628e3d3362e3d4a1ebdaa9136af35a6319edf980eac5712ccc303b5335f803a0e31173edea7fad0145545bdc89cf190cf')
+
+prepare() {
+  mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
+  cd "$pkgname-$pkgver"
+  # fix tests: https://github.com/twaddington/django-gravatar/issues/30
+  patch -Np1 -i ../"${pkgname}-1.4.2-fix_tests.patch"
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  python setup.py build
+}
+
+check() {
+  cd "$pkgname-$pkgver"
+  export PYTHONPATH="build:${PYTHONPATH}"
+  python example_project/manage.py test --verbosity=2 django_gravatar
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  python setup.py install --skip-build \
+    --optimize=1 \
+    --prefix=/usr \
+    --root="${pkgdir}"
+  install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}



More information about the arch-commits mailing list