archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-django-mailman3 / trunk / PKGBUILD
blobbaccbc467f3792669e46a79defb3882e85bf86e5
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=django-mailman3
4 pkgname=python-django-mailman3
5 pkgver=1.3.9
6 _commit=37b1ab762440d66eaf501beedd5c7d0c83e213a7  # refs/tags/1.3.9
7 pkgrel=2
8 pkgdesc="Libraries and templates to Django-based interfaces interacting with Mailman"
9 arch=(any)
10 url="https://gitlab.com/mailman/django-mailman3"
11 license=(GPL3)
12 depends=(python-django python-django-allauth python-django-gravatar
13 python-mailmanclient python-pytz)
14 makedepends=(git python-build python-installer python-setuptools python-wheel)
15 checkdepends=(python-pytest)
16 source=(git+https://gitlab.com/mailman/django-mailman3#tag=$_commit?signed)
17 sha512sums=('SKIP')
18 b2sums=('SKIP')
19 validpgpkeys=('541EA0448453394FF77A0ECC9D9B2BA061D0A67C') # Abhilash Raj <raj.abhilash1@gmail.com>
21 pkgver() {
22   cd $_name
23   git describe | sed 's/\([^-]*-g\)/r\1/;s/v//g;s/-/./g'
26 build() {
27   cd $_name
28   python -m build --wheel --no-isolation
31 check() {
32   cd $_name
33   export PYTHONPATH="build:$PYTHONPATH"
34   django-admin test --settings=django_mailman3.tests.settings_test django_mailman3
37 package() {
38   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
40   cd $_name
41   python -m installer --destdir="$pkgdir" dist/*.whl
42   install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname"