[arch-commits] Commit in python-django-sekizai/repos (3 files)

David Runge dvzrv at archlinux.org
Fri Jan 17 22:14:45 UTC 2020


    Date: Friday, January 17, 2020 @ 22:14:45
  Author: dvzrv
Revision: 552918

archrelease: copy trunk to community-any

Added:
  python-django-sekizai/repos/community-any/
  python-django-sekizai/repos/community-any/PKGBUILD
    (from rev 552917, python-django-sekizai/trunk/PKGBUILD)
  python-django-sekizai/repos/community-any/python-django-sekizai-1.0.0-disable_pep8.patch
    (from rev 552917, python-django-sekizai/trunk/python-django-sekizai-1.0.0-disable_pep8.patch)

------------------------------------------------+
 PKGBUILD                                       |   49 +++++++++++++++++++++++
 python-django-sekizai-1.0.0-disable_pep8.patch |   29 +++++++++++++
 2 files changed, 78 insertions(+)

Copied: python-django-sekizai/repos/community-any/PKGBUILD (from rev 552917, python-django-sekizai/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2020-01-17 22:14:45 UTC (rev 552918)
@@ -0,0 +1,49 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=django-sekizai
+pkgname=python-django-sekizai
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="Django Template Blocks with extra functionality"
+arch=('any')
+url="https://github.com/divio/django-sekizai"
+license=('BSD')
+depends=('python-django' 'python-django-classy-tags')
+makedepends=('python-setuptools')
+# test files are missing from 1.0.0 release
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
+        "https://raw.githubusercontent.com/divio/django-sekizai/d4c382cdc7c53ad595aa4fa6fe48dd8a59ca675e/runtests.py"
+        "${pkgname}-1.0.0-disable_pep8.patch")
+sha512sums=('3ac3de68a020b030270ef10299be610c3a6934907aa003a4c1adf840f9740b7a42fa27bd605a510ffecc59140b7fdeb6bfafec8c64158cfb9e3896e87a13e889'
+            '6458f3b9d07810189d4688cc7096a00ba15d6aa4b3acac620c9b31b5af4c9f9aea9801676695d8e385499cb77b36f9a4dfd5fb18594fe219f8601378d21242de'
+            '2b6bbeb401ab2d24cb3f233500415bd04e52afddac4c99ed82b5b2aaa1168e9a2e0a04ea3dcac394e3831c81dee823d470128ab048a517ecd0dda38e90628ed1')
+
+prepare() {
+  mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
+  ln -svf "${PWD}/runtests.py" "$pkgname-$pkgver/"
+  cd "$pkgname-$pkgver"
+  # disabling pep8 usage in the tests, as it is super outdated:
+  # https://github.com/divio/django-sekizai/issues/85
+  patch -Np1 -i "../${pkgname}-1.0.0-disable_pep8.patch"
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  python setup.py build
+}
+
+check() {
+  cd "$pkgname-$pkgver"
+  export PYTHONPATH="build:${PYTHONPATH}"
+  python setup.py test
+}
+
+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}"
+}

Copied: python-django-sekizai/repos/community-any/python-django-sekizai-1.0.0-disable_pep8.patch (from rev 552917, python-django-sekizai/trunk/python-django-sekizai-1.0.0-disable_pep8.patch)
===================================================================
--- community-any/python-django-sekizai-1.0.0-disable_pep8.patch	                        (rev 0)
+++ community-any/python-django-sekizai-1.0.0-disable_pep8.patch	2020-01-17 22:14:45 UTC (rev 552918)
@@ -0,0 +1,29 @@
+diff -ruN a/sekizai/tests.py b/sekizai/tests.py
+--- a/sekizai/tests.py	2019-04-11 13:58:21.000000000 +0200
++++ b/sekizai/tests.py	2020-01-17 22:52:11.701137106 +0100
+@@ -9,7 +9,6 @@
+ from django.conf import settings
+ from django.template.loader import render_to_string
+ from django.template.engine import Engine
+-import pep8
+ 
+ from sekizai import context_processors
+ from sekizai.context import SekizaiContext
+@@ -212,17 +211,6 @@
+         self.assertTrue(result.status, result.message)
+         return rendered
+ 
+-    def test_pep8(self):
+-        sekizai_dir = os.path.dirname(os.path.abspath(__file__))
+-        pep8style = pep8.StyleGuide()
+-        with CaptureStdout() as stdout:
+-            result = pep8style.check_files([sekizai_dir])
+-            errors = stdout.getvalue()
+-        self.assertEqual(
+-            result.total_errors, 0,
+-            "Code not PEP8 compliant:\n{0}".format(errors)
+-        )
+-
+     def test_basic_dual_block(self):
+         """
+         Basic dual block testing



More information about the arch-commits mailing list