Carl Smedstad pushed to branch main at Arch Linux / Packaging / Packages / 
python-pytest-bdd


Commits:
29680388 by Carl Smedstad at 2024-08-27T11:52:38+02:00
upgpkg: 7.2.0-2: Apply patch to fix pytest 8.1+ compatibility

Apply patch from PR https://github.com/pytest-dev/pytest-bdd/pull/690 to fix
upstream issue https://github.com/pytest-dev/pytest-bdd/issues/689.

This issue impacts the dependent package jrnl, requiring it to depend on
python-pytest7. With the patch applied, the tests in jrnl pass with the
standard python-pytest package (v8+).

Upstream issue for jrnl: https://github.com/jrnl-org/jrnl/issues/1879

Other PKGBUILD changes:

- Reformat PKGBUILD to have one dependency per line.
- Add missing implicitly satisfied dependencies reported by namcap.
- Leverage the pytest option --override-ini=addopts= to avoid patching
  pytest.ini.

- - - - -


2 changed files:

- .SRCINFO
- PKGBUILD


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,7 +1,7 @@
 pkgbase = python-pytest-bdd
        pkgdesc = BDD library for the pytest runner
        pkgver = 7.2.0
-       pkgrel = 1
+       pkgrel = 2
        url = https://github.com/pytest-dev/pytest-bdd
        arch = any
        license = MIT
@@ -10,13 +10,17 @@ pkgbase = python-pytest-bdd
        makedepends = python-build
        makedepends = python-installer
        makedepends = python-poetry-core
+       depends = python
        depends = python-mako
        depends = python-packaging
        depends = python-parse
        depends = python-parse-type
+       depends = python-pluggy
        depends = python-pytest
        depends = python-typing_extensions
        source = git+https://github.com/pytest-dev/pytest-bdd.git#tag=7.2.0
+       source = 
fix-target-fixture-registration-post-pytest-8-1.patch::https://github.com/pytest-dev/pytest-bdd/commit/bc819bc17ed99331b7313c12f9535a23a3359ee4.patch
        sha512sums = 
a6ed66fafc20967ae8609c95a56e98cacb6c30fcefc8b385952513f4e2f77cdc8a2ef87dc23b657fb8a8a7454ed3dee4cf0657a71e531f7f12184f6a55ccf4dc
+       sha512sums = 
e9e1aa988c9803020ea63f731fb5469bcdbc5499ae0acefd0dfbc3fd930a9737347d3325170d0f5f2a704455a383568daac2efb2f58cf9831700292e015b3ea5
 
 pkgname = python-pytest-bdd


=====================================
PKGBUILD
=====================================
@@ -2,22 +2,40 @@
 
 pkgname=python-pytest-bdd
 pkgver=7.2.0
-pkgrel=1
+pkgrel=2
 pkgdesc='BDD library for the pytest runner'
 arch=('any')
 license=('MIT')
 url='https://github.com/pytest-dev/pytest-bdd'
-depends=('python-mako' 'python-packaging' 'python-parse' 'python-parse-type' 
'python-pytest'
-         'python-typing_extensions')
-makedepends=('git' 'python-build' 'python-installer' 'python-poetry-core')
+depends=(
+  'python'
+  'python-mako'
+  'python-packaging'
+  'python-parse'
+  'python-parse-type'
+  'python-pluggy'
+  'python-pytest'
+  'python-typing_extensions'
+)
+makedepends=(
+  'git'
+  'python-build'
+  'python-installer'
+  'python-poetry-core'
+)
 checkdepends=('python-setuptools')
-source=("git+https://github.com/pytest-dev/pytest-bdd.git#tag=$pkgver";)
-sha512sums=('a6ed66fafc20967ae8609c95a56e98cacb6c30fcefc8b385952513f4e2f77cdc8a2ef87dc23b657fb8a8a7454ed3dee4cf0657a71e531f7f12184f6a55ccf4dc')
+source=(
+  "git+$url.git#tag=$pkgver"
+  # Fixes jrnl tests + pytest v8, see: 
https://github.com/jrnl-org/jrnl/issues/1879
+  # From PR: https://github.com/pytest-dev/pytest-bdd/pull/690
+  
"fix-target-fixture-registration-post-pytest-8-1.patch::$url/commit/bc819bc17ed99331b7313c12f9535a23a3359ee4.patch"
+)
+sha512sums=('a6ed66fafc20967ae8609c95a56e98cacb6c30fcefc8b385952513f4e2f77cdc8a2ef87dc23b657fb8a8a7454ed3dee4cf0657a71e531f7f12184f6a55ccf4dc'
+            
'e9e1aa988c9803020ea63f731fb5469bcdbc5499ae0acefd0dfbc3fd930a9737347d3325170d0f5f2a704455a383568daac2efb2f58cf9831700292e015b3ea5')
 
 prepare() {
   cd pytest-bdd
-  # Do not treat warnings as errors
-  sed -i '/^    error$/d' pytest.ini
+  patch -Np1 -i "$srcdir/fix-target-fixture-registration-post-pytest-8-1.patch"
 }
 
 build() {
@@ -26,12 +44,12 @@ build() {
 }
 
 check() {
-  # Hack entry points by installing it
-
   cd pytest-bdd
+  # Hack entry points by installing it
   python -m installer -d tmp_install dist/*.whl
   local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
-  PATH="$PWD/tmp_install/usr/bin:$PATH" 
PYTHONPATH="$PWD/tmp_install/$site_packages" pytest
+  PATH="$PWD/tmp_install/usr/bin:$PATH" 
PYTHONPATH="$PWD/tmp_install/$site_packages" \
+    pytest --override-ini=addopts=
 }
 
 package() {



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-pytest-bdd/-/commit/296803881964a21e60e06fa16281c75e2586d445

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-pytest-bdd/-/commit/296803881964a21e60e06fa16281c75e2586d445
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to