Subject: Re: [bug#77927] [PATCH 1/4] gnu: Add libiio

From: Guillaume Le Vaillant <[email-masked]>
Date: Sun, 20 Apr 2025 12:57:59 +0000

Rutherther via Guix-patches via <[email-masked]> skribis:

> +(define-public libiio
> +  (package
> +    (name "libiio")
> +    (version "0.24")
> [...]
> +    (arguments
> +     (list
> +      #:tests? #f
> +      #:configure-flags
> +      #~(list
> +         (string-append "-DUDEV_RULES_INSTALL_DIR=" #$output "/lib/udev/rules.d")
> +         "-DOSX_PACKAGE=off"
> +         "-DOSX_FRAMEWORK=off"
> +         (string-append "-DPython_EXECUTABLE=" (search-input-file %build-inputs "/bin/python3"))
> +         "-DPYTHON_BINDINGS=on")))
> [...]

Hi.
It looks like the installation of the Python bindings does not work;
they are not in the built package.
The build log indicates:

--8<---------------cut here---------------start------------->8---
running install
/gnu/store/mzhsp3vxj58hhbkrjdrvk9l47pk07kax-python-minimal-3.11.11/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Traceback (most recent call last):
  File "/tmp/guix-build-libiio-0.24.drv-0/build/bindings/python/setup.py", line 75, in _check_libiio_installed
    raise OSError
OSError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/guix-build-libiio-0.24.drv-0/build/bindings/python/setup.py", line 104, in <module>
    setup(**config)
  File "/gnu/store/mzhsp3vxj58hhbkrjdrvk9l47pk07kax-python-minimal-3.11.11/lib/python3.11/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gnu/store/mzhsp3vxj58hhbkrjdrvk9l47pk07kax-python-minimal-3.11.11/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/gnu/store/mzhsp3vxj58hhbkrjdrvk9l47pk07kax-python-minimal-3.11.11/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/gnu/store/mzhsp3vxj58hhbkrjdrvk9l47pk07kax-python-minimal-3.11.11/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
    self.run_command(cmd)
  File "/gnu/store/mzhsp3vxj58hhbkrjdrvk9l47pk07kax-python-minimal-3.11.11/lib/python3.11/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/gnu/store/mzhsp3vxj58hhbkrjdrvk9l47pk07kax-python-minimal-3.11.11/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.run()
  File "/tmp/guix-build-libiio-0.24.drv-0/build/bindings/python/setup.py", line 43, in run
    self._check_libiio_installed()
  File "/tmp/guix-build-libiio-0.24.drv-0/build/bindings/python/setup.py", line 81, in _check_libiio_installed
    raise Exception(msg)
Exception: The libiio library could not be found.
            libiio needs to be installed first before the python bindings.
            The latest release can be found on GitHub:
            https://github.com/analogdevicesinc/libiio/releases
--8<---------------cut here---------------end--------------->8---

Could you take a look at it?