Package Details: python-pyvisa 1.15.0-4

Git Clone URL: https://aur.archlinux.org/python-pyvisa.git (read-only, click to copy)
Package Base: python-pyvisa
Description: A Python package with bindings to the 'Virtual Instrument Software Architecture' VISA library
Upstream URL: https://github.com/pyvisa/pyvisa
Keywords: library python pyvisa visa
Licenses: MIT
Submitter: alex.forencich
Maintainer: begin-theadventu
Last Packager: begin-theadventu
Votes: 12
Popularity: 0.001183
First Submitted: 2015-07-20 19:27 (UTC)
Last Updated: 2025-07-16 17:10 (UTC)

Latest Comments

1 2 3 Next › Last »

begin-theadventu commented on 2025-07-16 17:08 (UTC)

@Daniel_M Oh, yeah you're right.. Export needs to be declared per each step. Thanks!

Daniel_M commented on 2025-07-11 10:05 (UTC) (edited on 2025-07-11 10:08 (UTC) by Daniel_M)

build() {
cd pyvisa-$pkgver
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
python -m build --wheel --no-isolation
}

Should hopefully sort it out ( based on python-docker )

OdysseusGE commented on 2025-07-11 02:12 (UTC) (edited on 2025-07-11 02:12 (UTC) by OdysseusGE)

Actually, I misspoke. This package still fails when building with yay, but succeeds using makepkg. This is because yay builds in two steps, equivalent to 'makepkg --nobuild' followed by 'makepkg --noprepare', so SETUPTOOLS_SCM_PRETEND_VERSION isn't set in the build step.

I think the fix is to just move that export into build. I had fooled myself into thinking installing 'python-pkgconfig' had resolved the issue because I tested using 'makepkg'. It's not needed and can be removed from makedpends.

begin-theadventu commented on 2025-07-06 08:34 (UTC)

@ra1nb0w Done.

@OdysseusGE Thanks!

ra1nb0w commented on 2025-07-03 10:47 (UTC)

I confirm willemsk and OdysseusGE fixes. Please patch the aur. Thanks

OdysseusGE commented on 2025-06-18 02:00 (UTC) (edited on 2025-06-18 02:02 (UTC) by OdysseusGE)

I think 'python-pkgconfig' needs to be included in makedepends. Otherwise build fails with

LookupError: setuptools-scm was unable to detect version ...

willemsk commented on 2025-05-05 12:12 (UTC)

The build fails for me in a clean chroot:

Traceback (most recent call last): ... LookupError: setuptools-scm was unable to detect version for /home/xxxx/.cache/paru/clone/python-pyvisa/src/pyvisa-1.15.0.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj

Alternatively, set the version with the environment variable SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${NORMALIZED_DIST_NAME} as described in https://setuptools-scm.readthedocs.io/en/latest/config.

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel ==> ERROR: A failure occurred in build(). Aborting... error: failed to build 'python-pyvisa-1.15.0-2': error: packages failed to build: python-pyvisa-1.15.0-2

Grabbing the source tarball from PyPi instead of GitHub solves the problem. Patch below:

diff --git a/PKGBUILD b/PKGBUILD
index 556b51e..455f077 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,8 +3,9 @@
 # Contributor: Alex Forencich <alex@alexforencich.com>

 pkgname=python-pyvisa
+_name=${pkgname#python-}
 pkgver=1.15.0
-pkgrel=2
+pkgrel=3
 pkgdesc="A Python package with bindings to the 'Virtual Instrument Software Architecture' VISA library"
 url="https://github.com/pyvisa/pyvisa"
 license=('MIT')
@@ -12,8 +13,8 @@ arch=('any')
 depends=('python-distribute' 'python-docutils' 'python-typing_extensions')
 optdepends=('python-pyvisa-py: Pure Python backend')
 makedepends=('python-build' 'python-installer' 'python-pytest' 'python-setuptools-scm')
-source=("https://github.com/pyvisa/pyvisa/archive/refs/tags/$pkgver.tar.gz")
-sha256sums=('3da0bab73f06e1aba64a9f35b1aaee4cee1d950347b811844bb6322c5c849b52')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
+sha256sums=('cec3cb91703a2849f6faa42b1ecd7689a0175baabff8ca33fce9f45934ce45e6')

 prepare() {
   export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver

begin-theadventu commented on 2025-04-29 13:58 (UTC)

@BrainDamage Thank you!

BrainDamage commented on 2025-04-29 06:56 (UTC)

Dropping python-setuptools-scm from the makedeps is not correct. It is still required, and the build will fail in a clean chroot with:

ERROR Missing dependencies:
    setuptools_scm[toml]>=3.4.3

you can double check in the pyproject.toml that it still requires it

begin-theadventu commented on 2025-04-28 16:31 (UTC)

@fenugrec Thank you!