diff options
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | 2c5fb47048d3bff449554fa7fbe3a8b5d51d8d9f.patch | 22 | ||||
-rw-r--r-- | PKGBUILD | 42 | ||||
-rw-r--r-- | PR34.patch | 79 |
4 files changed, 163 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..747adcf0b29c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = python-pyramid-chameleon + pkgdesc = Chameleon template compiler for pyramid + pkgver = 0.3 + pkgrel = 1 + url = https://github.com/Pylons/pyramid_chameleon + arch = any + license = custom:RPL + checkdepends = python-pytest + checkdepends = python-pytest-cov + checkdepends = python-coverage + depends = python-chameleon + depends = python-pyramid + source = python-pyramid-chameleon-0.3.tar.gz::https://files.pythonhosted.org/packages/source/p/pyramid_chameleon/pyramid_chameleon-0.3.tar.gz + source = 2c5fb47048d3bff449554fa7fbe3a8b5d51d8d9f.patch + source = PR34.patch + sha256sums = d176792a50eb015d7865b44bd9b24a7bd0489fa9a5cebbd17b9e05048cef9017 + sha256sums = 0f84122b1737b8593c040fb828517134363e6a517b7e88b961a39703343e7790 + sha256sums = 5b6c6a2dcac07f682db30a52f5994c1ac8c393b901cbbc60e65fbe051188c6cc + +pkgname = python-pyramid-chameleon diff --git a/2c5fb47048d3bff449554fa7fbe3a8b5d51d8d9f.patch b/2c5fb47048d3bff449554fa7fbe3a8b5d51d8d9f.patch new file mode 100644 index 000000000000..424bc53d6f5b --- /dev/null +++ b/2c5fb47048d3bff449554fa7fbe3a8b5d51d8d9f.patch @@ -0,0 +1,22 @@ +From 2c5fb47048d3bff449554fa7fbe3a8b5d51d8d9f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Domen=20Ko=C5=BEar?= <domen@dev.si> +Date: Fri, 19 Apr 2019 02:26:05 +0000 +Subject: [PATCH] test_renderers: fix wrong import + +--- + pyramid_chameleon/tests/test_renderers.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyramid_chameleon/tests/test_renderers.py b/pyramid_chameleon/tests/test_renderers.py +index dd45adb..fefe683 100644 +--- a/pyramid_chameleon/tests/test_renderers.py ++++ b/pyramid_chameleon/tests/test_renderers.py +@@ -258,7 +258,7 @@ def test___call__spec_notfound(self): + self.assertRaises(ValueError, lookup.__call__, info) + + def test___call__spec_alreadyregistered(self): +- from pyramid import tests ++ from pyramid_chameleon import tests + module_name = tests.__name__ + relpath = 'test_renderers.py' + spec = '%s:%s' % (module_name, relpath) diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..295f2d844ec9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: piernov <piernov@piernov.org> + +pkgname=python-pyramid-chameleon +pkgver=0.3 +pkgrel=1 +pkgdesc='Chameleon template compiler for pyramid' +arch=('any') +url='https://github.com/Pylons/pyramid_chameleon' +license=('custom:RPL') +depends=('python-chameleon' 'python-pyramid') +checkdepends=('python-pytest' 'python-pytest-cov' 'python-coverage') +source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/p/pyramid_chameleon/pyramid_chameleon-$pkgver.tar.gz" + "2c5fb47048d3bff449554fa7fbe3a8b5d51d8d9f.patch" + "PR34.patch") +sha256sums=('d176792a50eb015d7865b44bd9b24a7bd0489fa9a5cebbd17b9e05048cef9017' + '0f84122b1737b8593c040fb828517134363e6a517b7e88b961a39703343e7790' + '5b6c6a2dcac07f682db30a52f5994c1ac8c393b901cbbc60e65fbe051188c6cc') + +prepare() { + cd "pyramid_chameleon-$pkgver" + patch -p1 < "${srcdir}/2c5fb47048d3bff449554fa7fbe3a8b5d51d8d9f.patch" + patch -p1 < "${srcdir}/PR34.patch" +} + +build() { + cd "pyramid_chameleon-$pkgver" + python -m build --wheel --no-isolation +} + +check() { + cd "pyramid_chameleon-$pkgver" + PYTHONPATH=./src pytest -x --disable-warnings +} + +package() { + export PYTHONHASHSEED=0 + cd "pyramid_chameleon-$pkgver" + python -m installer --destdir="$pkgdir/" dist/*.whl + install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +# vim:set ts=2 sw=2 et: diff --git a/PR34.patch b/PR34.patch new file mode 100644 index 000000000000..53f1ff537280 --- /dev/null +++ b/PR34.patch @@ -0,0 +1,79 @@ +From 36348bf4c01f52c3461e7ba4d20b1edfc54dba50 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mark=C3=A9ta=20Cal=C3=A1bkov=C3=A1?= + <meggy.calabkova@gmail.com> +Date: Tue, 3 Aug 2021 12:48:30 +0200 +Subject: [PATCH 1/3] compatibility with pyramid 2 + +--- + pyramid_chameleon/tests/test_text.py | 7 +++---- + pyramid_chameleon/tests/test_zpt.py | 5 ++--- + 2 files changed, 5 insertions(+), 7 deletions(-) + +diff --git a/pyramid_chameleon/tests/test_text.py b/pyramid_chameleon/tests/test_text.py +index ca294ca..37801a5 100644 +--- a/pyramid_chameleon/tests/test_text.py ++++ b/pyramid_chameleon/tests/test_text.py +@@ -1,7 +1,6 @@ + import sys + import unittest + +-from pyramid.compat import binary_type + from pyramid import testing + + class Base(object): +@@ -97,7 +96,7 @@ def test_call(self): + lookup = DummyLookup() + instance = self._makeOne(minimal, lookup) + result = instance({}, {}) +- self.assertTrue(isinstance(result, binary_type)) ++ self.assertTrue(isinstance(result, bytes)) + self.assertEqual(result, b'Hello.\n') + + def test_call_with_nondict_value(self): +@@ -111,7 +110,7 @@ def test_call_nonminimal(self): + lookup = DummyLookup() + instance = self._makeOne(nonminimal, lookup) + result = instance({'name':'Chris'}, {}) +- self.assertTrue(isinstance(result, binary_type)) ++ self.assertTrue(isinstance(result, bytes)) + self.assertEqual(result, b'Hello, Chris!\n') + + def test_implementation(self): +@@ -119,7 +118,7 @@ def test_implementation(self): + lookup = DummyLookup() + instance = self._makeOne(minimal, lookup) + result = instance.implementation()() +- self.assertTrue(isinstance(result, binary_type)) ++ self.assertTrue(isinstance(result, bytes)) + self.assertEqual(result, b'Hello.\n') + + class DummyLookup(object): +diff --git a/pyramid_chameleon/tests/test_zpt.py b/pyramid_chameleon/tests/test_zpt.py +index 9678904..2db2206 100644 +--- a/pyramid_chameleon/tests/test_zpt.py ++++ b/pyramid_chameleon/tests/test_zpt.py +@@ -2,7 +2,6 @@ + import unittest + + from pyramid import testing +-from pyramid.compat import text_type + + class Base(object): + def setUp(self): +@@ -54,7 +53,7 @@ def test_call(self): + lookup = DummyLookup() + instance = self._makeOne(minimal, lookup) + result = instance({}, {}) +- self.assertTrue(isinstance(result, text_type)) ++ self.assertTrue(isinstance(result, str)) + self.assertEqual(result.rstrip('\n'), + '<div xmlns="http://www.w3.org/1999/xhtml">\n</div>') + +@@ -121,7 +120,7 @@ def test_implementation(self): + lookup = DummyLookup() + instance = self._makeOne(minimal, lookup) + result = instance.implementation()() +- self.assertTrue(isinstance(result, text_type)) ++ self.assertTrue(isinstance(result, str)) + self.assertEqual(result.rstrip('\n'), + '<div xmlns="http://www.w3.org/1999/xhtml">\n</div>') |