David Runge pushed to branch main at Arch Linux / Packaging / Packages / 
python-importlib_resources


Commits:
8c2b46c1 by David Runge at 2023-10-25T18:01:52+02:00
upgpkg: 6.1.0-1

Fix tests by installing to temporary location and testing against that.

- - - - -


2 changed files:

- + .SRCINFO
- PKGBUILD


Changes:

=====================================
.SRCINFO
=====================================
@@ -0,0 +1,24 @@
+pkgbase = python-importlib_resources
+       pkgdesc = Design and implementation for a planned importlib.resources
+       pkgver = 6.1.0
+       pkgrel = 1
+       url = https://github.com/python/importlib_resources
+       arch = any
+       license = Apache
+       checkdepends = python-pytest
+       checkdepends = python-pytest-enabler
+       checkdepends = python-tests
+       makedepends = git
+       makedepends = python-build
+       makedepends = python-installer
+       makedepends = python-setuptools-scm
+       makedepends = python-toml
+       makedepends = python-wheel
+       depends = python
+       depends = python-zipp
+       provides = python-importlib-resources
+       source = 
git+https://github.com/python/importlib_resources#tag=b811debda54825282541d3453b8743b04d357ffb
+       sha512sums = SKIP
+       b2sums = SKIP
+
+pkgname = python-importlib_resources


=====================================
PKGBUILD
=====================================
@@ -2,8 +2,8 @@
 
 _name=importlib_resources
 pkgname=python-importlib_resources
-_commit=dc6d29aa92328fca6f6ae28ef8af2384c106ddb2  # refs/tags/v6.0.1
-pkgver=6.0.1
+_commit=b811debda54825282541d3453b8743b04d357ffb  # refs/tags/v6.1.0
+pkgver=6.1.0
 pkgrel=1
 pkgdesc="Design and implementation for a planned importlib.resources"
 arch=(any)
@@ -11,6 +11,7 @@ url="https://github.com/python/importlib_resources";
 license=(Apache)
 depends=(
   python
+  python-zipp
 )
 makedepends=(
   git
@@ -22,6 +23,7 @@ makedepends=(
 )
 checkdepends=(
   python-pytest
+  python-pytest-enabler
   python-tests
 )
 provides=(python-importlib-resources)
@@ -40,8 +42,16 @@ build() {
 }
 
 check() {
+  local pytest_options=(
+    -vv
+  )
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+
   cd $_name
-  pytest -vv
+  # install to temporary location, as importlib is used
+  python -m installer --destdir=test_dir dist/*.whl
+  export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH"
+  pytest "${pytest_options[@]}" "$PWD/test_dir/$site_packages/$_name/"
 }
 
 package() {



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-importlib_resources/-/commit/8c2b46c1940d2cc5f195ec90c8ddf4b46db31d1d

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


Reply via email to