Date: Thursday, April 6, 2023 @ 18:20:21 Author: dvzrv Revision: 1440160
upgpkg: python-wheezy-template 3.1.0-5: Rebuild against python 3.11. Fix issue with 3.11 that upstream refuses to patch: https://github.com/akornatskyy/wheezy.template/issues/68 Switch to PEP517. Use bash arrays with one entry per line for better handling. Added: python-wheezy-template/trunk/python-wheezy-template-3.1.0-python3.11.patch Modified: python-wheezy-template/trunk/PKGBUILD -----------------------------------------------+ PKGBUILD | 61 ++++++++++++++---------- python-wheezy-template-3.1.0-python3.11.patch | 12 ++++ 2 files changed, 50 insertions(+), 23 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2023-04-06 18:19:30 UTC (rev 1440159) +++ PKGBUILD 2023-04-06 18:20:21 UTC (rev 1440160) @@ -1,36 +1,51 @@ -# Maintainer: Eli Schwartz <[email protected]> +# Maintainer: +# Contributor: Eli Schwartz <[email protected]> -_pkgname=wheezy.template +_name=wheezy.template pkgname=python-wheezy-template pkgver=3.1.0 -pkgrel=4 +pkgrel=5 pkgdesc="lightweight template library" -arch=('x86_64') -url="https://github.com/akornatskyy/${_pkgname}" -license=('MIT') -depends=('python') -makedepends=('python-setuptools' 'cython') -checkdepends=('python-pytest') -#source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz") -source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz") -sha256sums=('a75692c8bc4aeb750a378192fe094f6c28901526c6ca754fa92f3783cdd7abcd') -b2sums=('6cbaa6e5656a0b3bf417ed500770c97f2207f97822ccdf624c87cb0f3c0d2fa3b1a2269641325c6d6138568aeff3bcc417e6e4896186e2fe7c1b31a15e2d7365') +arch=(x86_64) +url="https://github.com/akornatskyy/wheezy.template" +license=(MIT) +depends=(python) +makedepends=( + cython + python-build + python-installer + python-setuptools + python-wheel +) +checkdepends=(python-pytest) +# NOTE: no tests in pypi sdist tarball +# source=(https://files.pythonhosted.org/packages/source/${_name:0:1}/$_name/$_name-$pkgver.tar.gz) +source=( + $pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz + $pkgname-3.1.0-python3.11.patch # https://github.com/akornatskyy/wheezy.template/issues/68 +) +sha256sums=('a75692c8bc4aeb750a378192fe094f6c28901526c6ca754fa92f3783cdd7abcd' + '4a77d24ec88623fac9729b5f3d4eeade8e6bbb0c14710ff229844dd4d7c3e26a') +b2sums=('6cbaa6e5656a0b3bf417ed500770c97f2207f97822ccdf624c87cb0f3c0d2fa3b1a2269641325c6d6138568aeff3bcc417e6e4896186e2fe7c1b31a15e2d7365' + '2d38b102c63459e1561b2864b954cce1c706f5163b43d2f860f09a33d99cf50ce2729303eb91da04238484595502b1a85ef39d114b695fc27d6261502804b3bb') +prepare() { + patch -Np1 -d $_name-$pkgver -i ../$pkgname-3.1.0-python3.11.patch +} + build() { - cd ${_pkgname}-${pkgver} - - python setup.py build + cd $_name-$pkgver + python -m build --wheel --no-isolation } check() { - cd ${_pkgname}-${pkgver} - - PYTHONPATH="$PWD/src" pytest --import-mode=importlib + cd $_name-$pkgver + export PYTHONPATH="$PWD/src:$PYTHONPATH" + pytest --import-mode=importlib } package() { - cd ${_pkgname}-${pkgver} - - python setup.py install --root="${pkgdir}" --optimize=1 --skip-build - install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE + cd $_name-$pkgver + python -m installer --destdir="$pkgdir" dist/*.whl + install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" } Added: python-wheezy-template-3.1.0-python3.11.patch =================================================================== --- python-wheezy-template-3.1.0-python3.11.patch (rev 0) +++ python-wheezy-template-3.1.0-python3.11.patch 2023-04-06 18:20:21 UTC (rev 1440160) @@ -0,0 +1,12 @@ +diff -ruN a/src/wheezy/template/engine.py b/src/wheezy/template/engine.py +--- a/src/wheezy/template/engine.py 2021-04-17 09:05:32.000000000 +0200 ++++ b/src/wheezy/template/engine.py 2023-04-06 20:15:00.437384667 +0200 +@@ -44,7 +44,7 @@ + self.global_vars = {"_r": self.render, "_i": self.import_name} + self.loader = loader + self.template_class = template_class or Template +- self.compiler = Compiler(self.global_vars, -2) ++ self.compiler = Compiler(self.global_vars, 0) + self.lexer = Lexer(**lexer_scan(extensions)) + self.parser = Parser(**parser_scan(extensions)) + self.builder = SourceBuilder(**builder_scan(extensions))
