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

Jelle van der Waa jelle at archlinux.org
Fri May 28 19:40:22 UTC 2021


    Date: Friday, May 28, 2021 @ 19:40:22
  Author: jelle
Revision: 950051

archrelease: copy trunk to community-any

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

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

Copied: python-django-csp/repos/community-any/PKGBUILD (from rev 950050, python-django-csp/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2021-05-28 19:40:22 UTC (rev 950051)
@@ -0,0 +1,36 @@
+# Maintainer: Jelle van der Waa <jelle at archlinux.org>
+
+pkgname=python-django-csp
+pkgver=3.7
+pkgrel=1
+pkgdesc="Django-CSP adds Content-Security-Policy headers to Django"
+arch=('any')
+url="https://github.com/mozilla/django-csp"
+license=('BSD')
+checkdepends=('python-pytest' 'python-pytest-django')
+depends=('python-django' 'python-jinja')
+source=($pkgname-$pkgver.tar.gz::https://github.com/mozilla/django-csp/archive/refs/tags/${pkgver}.tar.gz)
+sha512sums=('d15ecae2a59e47151f3b04d78138fbe5c22967e0366595324b41fdd3b3f8af2bf7a44606f329b853c6ebb14a590e63d54d02fb26a7248e04789d1c54410fb5ee')
+
+prepare() {
+  cd "django-csp-$pkgver"
+  sed -i 's/--pep8 --flakes//' setup.cfg
+}
+
+build() {
+  cd "django-csp-$pkgver"
+  python setup.py build
+}
+
+check() {
+  cd "django-csp-$pkgver"
+  PYTHONPATH=. pytest csp/tests
+}
+
+package() {
+  cd "django-csp-$pkgver"
+  python setup.py install --skip-build \
+                          --optimize=1 \
+                          --root="${pkgdir}"
+  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}



More information about the arch-commits mailing list