Jakub Klinkovský pushed to branch main at Arch Linux / Packaging / Packages / 
python-pyclibrary


Commits:
8869502d by Jakub Klinkovský at 2025-02-06T07:26:50+01:00
upgpkg: 0.2.2-1: new upstream release + switch to PEP 517 build

Also switch to building from source archive so we have tests, but they still
don't work...

- - - - -


2 changed files:

- .SRCINFO
- PKGBUILD


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,13 +1,17 @@
 pkgbase = python-pyclibrary
        pkgdesc = C parser and bindings automation for Python
-       pkgver = 0.2.1
-       pkgrel = 5
+       pkgver = 0.2.2
+       pkgrel = 1
        url = https://github.com/MatthieuDartiailh/pyclibrary
        arch = any
        license = MIT
-       depends = python-setuptools
+       checkdepends = python-pytest
+       makedepends = python-build
+       makedepends = python-installer
+       makedepends = python-setuptools
+       depends = python
        depends = python-pyparsing
-       source = 
https://github.com/MatthieuDartiailh/pyclibrary/releases/download/0.2.1/pyclibrary-0.2.1.tar.gz
-       sha256sums = 
735b2b42a9015a0cfdd8522b14fb9d0a66a9f790b5f0e948bda90675f54be049
+       source = 
python-pyclibrary-0.2.2.tar.gz::https://github.com/MatthieuDartiailh/pyclibrary/archive/refs/tags/0.2.2.tar.gz
+       b2sums = 
643fc15266af394c155f08dd366196dd68b7a30b6ff240363e7bf37e58f762111447567f67cebe7b54dcdb5bfab48e3f2bfa79ba22a09d90a084052d773671c5
 
 pkgname = python-pyclibrary


=====================================
PKGBUILD
=====================================
@@ -1,25 +1,50 @@
+# Maintainer: Jakub Klinkovský <lahwaacz at archlinux dot org>
 # Maintainer: Sven-Hendrik Haase <svenst...@archlinux.org>
 # Contributor: Jonni Westphalen <jonny.westpha...@googlemail.com>
+
 pkgname=python-pyclibrary
-pkgver=0.2.1
-pkgrel=5
+pkgver=0.2.2
+pkgrel=1
 pkgdesc="C parser and bindings automation for Python"
-arch=('any')
+arch=(any)
 url="https://github.com/MatthieuDartiailh/pyclibrary";
-license=('MIT')
-depends=('python-setuptools' 'python-pyparsing')
-source=("https://github.com/MatthieuDartiailh/pyclibrary/releases/download/${pkgver}/pyclibrary-${pkgver}.tar.gz";)
-sha256sums=('735b2b42a9015a0cfdd8522b14fb9d0a66a9f790b5f0e948bda90675f54be049')
+license=(MIT)
+depends=(
+  python
+  python-pyparsing
+)
+makedepends=(
+  python-build
+  python-installer
+  python-setuptools
+)
+checkdepends=(
+  python-pytest
+)
+source=($pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz)
+b2sums=('643fc15266af394c155f08dd366196dd68b7a30b6ff240363e7bf37e58f762111447567f67cebe7b54dcdb5bfab48e3f2bfa79ba22a09d90a084052d773671c5')
 
 build() {
-    cd "pyclibrary-${pkgver}"
+  cd pyclibrary-$pkgver
 
-    python setup.py build
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  cd pyclibrary-$pkgver
+
+  # FIXME: For some reason pytest does not execute the xunit-style setup 
functions (setup_module, setup_class, etc.)
+  # although it is documented: 
https://docs.pytest.org/en/stable/how-to/xunit_setup.html
+  # Hence, we get errors like AttributeError: 'TestParsing' object has no 
attribute 'parser'
+  #python -m venv --system-site-packages test-env
+  #test-env/bin/python -m installer dist/*.whl
+  #test-env/bin/python -m pytest tests
 }
 
 package() {
-    cd "pyclibrary-${pkgver}"
-    python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+  cd pyclibrary-$pkgver
+
+  python -m installer --destdir="$pkgdir" dist/*.whl
 
-    install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+  install -vDm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
 }



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-pyclibrary/-/commit/8869502d327c649349aef24430e26051c29609ac

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-pyclibrary/-/commit/8869502d327c649349aef24430e26051c29609ac
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to