George Rawlinson pushed to branch main at Arch Linux / Packaging / Packages / 
python-j2cli


Commits:
a44b4194 by loqs at 2026-01-10T17:41:49+00:00
Replace in checkdepends python-nose with python-pytest

Related 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-nose/-/issues/2.

- - - - -
f32e36af by loqs at 2026-02-26T21:22:43+00:00
Remove pkg_resources use

Related https://archlinux.org/todo/python-pkg_resources-deprecation/.

- - - - -


4 changed files:

- .SRCINFO
- PKGBUILD
- REUSE.toml
- + python-j2cli-0.3.12b-remove-pkg_resources.patch


Changes:

=====================================
.SRCINFO
=====================================
@@ -5,7 +5,7 @@ pkgbase = python-j2cli
        url = https://github.com/kolypto/j2cli
        arch = any
        license = BSD-2-Clause
-       checkdepends = python-nose
+       checkdepends = python-pytest
        makedepends = python-build
        makedepends = python-installer
        makedepends = python-wheel
@@ -16,7 +16,9 @@ pkgbase = python-j2cli
        optdepends = python-simplejson: for an alternative JSON parser
        source = 
python-j2cli-0.3.12b.tar.gz::https://github.com/kolypto/j2cli/archive/v0.3.12b.tar.gz
        source = imp-removal.patch
+       source = python-j2cli-0.3.12b-remove-pkg_resources.patch
        b2sums = 
08b434596021576dcecbaa8e700479c103f5d93c3d42880f8f5062fb0db78d4bd0bcc43c068e56b950a654b383a27b5aaff3b58ef22382c6fd6da8d9135ede98
        b2sums = 
fec5bdcc6e63ddc39aa8d6b6a9b514ba3fb10180af1b9e35e3c924eadf1916d05404b5abbc6067b65724d7fc7def784eebc2daee65c6b2b218ea82f1c478bd8a
+       b2sums = 
691c98c9ed5956a3e9d7ebcaf488972aa30db5fc186345d433acf503b1117072544ebc87c33b2df6a71be2ff4b2a627605369a4a8aa4fec1b38cb6626a780482
 
 pkgname = python-j2cli


=====================================
PKGBUILD
=====================================
@@ -11,16 +11,19 @@ license=("BSD-2-Clause")
 arch=('any')
 depends=('python' 'python-jinja' 'python-pyyaml' 'python-setuptools')
 makedepends=('python-build' 'python-installer' 'python-wheel')
-checkdepends=('python-nose')
+checkdepends=('python-pytest')
 optdepends=('python-simplejson: for an alternative JSON parser')
 
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/kolypto/j2cli/archive/v${pkgver}.tar.gz";
-       "imp-removal.patch")
+       "imp-removal.patch"
+       "python-j2cli-0.3.12b-remove-pkg_resources.patch")
 
b2sums=('08b434596021576dcecbaa8e700479c103f5d93c3d42880f8f5062fb0db78d4bd0bcc43c068e56b950a654b383a27b5aaff3b58ef22382c6fd6da8d9135ede98'
-        
'fec5bdcc6e63ddc39aa8d6b6a9b514ba3fb10180af1b9e35e3c924eadf1916d05404b5abbc6067b65724d7fc7def784eebc2daee65c6b2b218ea82f1c478bd8a')
+        
'fec5bdcc6e63ddc39aa8d6b6a9b514ba3fb10180af1b9e35e3c924eadf1916d05404b5abbc6067b65724d7fc7def784eebc2daee65c6b2b218ea82f1c478bd8a'
+        
'691c98c9ed5956a3e9d7ebcaf488972aa30db5fc186345d433acf503b1117072544ebc87c33b2df6a71be2ff4b2a627605369a4a8aa4fec1b38cb6626a780482')
 
 prepare() {
   cd "${_pkgname}-${pkgver}"
   patch -Np1 -i ${srcdir}/imp-removal.patch
+  patch -Np1 -i ${srcdir}/python-j2cli-0.3.12b-remove-pkg_resources.patch
 }
 
 build () {
@@ -33,7 +36,7 @@ check () {
 
   cd "${_pkgname}-${pkgver}"
   python -m installer --destdir=test_dir dist/*.whl
-  PYTHONPATH="$PWD/test_dir/$site_packages" nosetests
+  PYTHONPATH="$PWD/test_dir/$site_packages" pytest tests/render-test.py
 }
 
 package () {


=====================================
REUSE.toml
=====================================
@@ -24,6 +24,7 @@ SPDX-License-Identifier = "0BSD"
 [[annotations]]
 path = [
     "imp-removal.patch",
+    "python-j2cli-0.3.12b-remove-pkg_resources.patch",
 ]
 SPDX-FileCopyrightText = "python-j2cli contributors"
 SPDX-License-Identifier = "BSD-2-Clause"


=====================================
python-j2cli-0.3.12b-remove-pkg_resources.patch
=====================================
@@ -0,0 +1,21 @@
+diff --git a/j2cli/__init__.py b/j2cli/__init__.py
+index bc39e44..148d479 100644
+--- a/j2cli/__init__.py
++++ b/j2cli/__init__.py
+@@ -1,11 +1,14 @@
+ #! /usr/bin/env python
+ 
+ """ j2cli main file """
+-import pkg_resources
++from importlib.metadata import version
+ 
+ __author__ = "Mark Vartanyan"
+ __email__ = "[email protected]"
+-__version__ = pkg_resources.get_distribution('j2cli').version
++try:
++    __version__ = version("j2cli")
++except Exception:
++    __version__ = "unknown"
+ 
+ from j2cli.cli import main
+ 



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-j2cli/-/compare/e89c68c7e5110235ebdeae7592b23275d0ba76c3...f32e36af9c67a77cb2b31f63aa9b88a345194fd4

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-j2cli/-/compare/e89c68c7e5110235ebdeae7592b23275d0ba76c3...f32e36af9c67a77cb2b31f63aa9b88a345194fd4
You're receiving this email because of your account on gitlab.archlinux.org. 
Manage all notifications: https://gitlab.archlinux.org/-/profile/notifications 
| Help: https://gitlab.archlinux.org/help


Reply via email to