I’m trying to install waydroid with yay but it fails on installing the python-gbinder dependency because the distutils package is deprecated in the new version of python and was replaced with setuptool I believe. Is there a way I can install this?
$ yay python-gbinder
1 aur/python-gbinder 1.0.0-2 (+4 1.51)
Python bindings for libgbinder
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 1
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1] python-gbinder-1.0.0-2
1 python-gbinder (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> A
:: Deleting (1/1): /home/fx9/.cache/yay/python-gbinder
:: (1/1) Downloaded PKGBUILD: python-gbinder
1 python-gbinder (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: (1/1) Parsing SRCINFO: python-gbinder
==> Making package: python-gbinder 1.0.0-2 (Mon 10 Jan 2022 02:54:25 PM EST)
==> Retrieving sources...
-> Cloning python-gbinder git repo...
Cloning into bare repository '/home/fx9/.cache/yay/python-gbinder/python-gbinder'...
remote: Enumerating objects: 49, done.
remote: Counting objects: 100% (49/49), done.
remote: Compressing objects: 100% (33/33), done.
remote: Total 49 (delta 14), reused 46 (delta 11), pack-reused 0
Receiving objects: 100% (49/49), 36.28 KiB | 2.59 MiB/s, done.
Resolving deltas: 100% (14/14), done.
==> Validating source files with sha512sums...
python-gbinder ... Skipped
==> Making package: python-gbinder 1.0.0-2 (Mon 10 Jan 2022 02:54:27 PM EST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating python-gbinder git repo...
Fetching origin
==> Validating source files with sha512sums...
python-gbinder ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Creating working copy of python-gbinder git repo...
Cloning into 'python-gbinder'...
done.
Switched to a new branch 'makepkg'
==> Starting pkgver()...
==> Sources are ready.
==> Making package: python-gbinder 1.0.0-2 (Mon 10 Jan 2022 02:54:32 PM EST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Starting build()...
/home/fx9/.cache/yay/python-gbinder/src/python-gbinder/setup.py:2: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.core import setup, Extension
Traceback (most recent call last):
File "/home/fx9/.cache/yay/python-gbinder/src/python-gbinder/setup.py", line 22, in <module>
extensions = [Extension('gbinder', **extension_kwargs)]
TypeError: keywords must be strings
==> ERROR: A failure occurred in build().
Aborting...
-> error making: python-gbinder
I’m getting the same failure after building the dependency chain (libglibutil → libgbinder → python-gbinder) with makepkg so something more interesting is going on.
The issue seems to be with the None: ['thread'], element - I think this is essentially being interpreted as a null value rather than a string when the dict is unpacked using **extension_kwargs.
So, try this addition to the PKGBUILD (put it before the build() function):
prepare() {
cd $pkgname
sed -i "21cextension_kwargs = {'sources': ['gbinder.pyx'], 'include_dirs': ['/usr/include/gbinder', '/usr/include/glib-2.0', '/usr/lib/glib-2.0/include', '/usr/include/sysprof-4', '/usr/include/gutil'], 'libraries': ['gbinder']}" setup.py
}
This will hard-code the a working dictionary and work around the issue. I’m not sure if this is a packaging bug or an upstream bug, but it will be worth leaving a comment on the AUR package page.
daferreira commented on 2022-01-11 00:18
Hello! I failed to compile with the current provided python -- 3.10.1. I had to change the PKGBUILD to fetch the latest commit from python-gbinder main branch (79d40e9e564772973f7f085ed5c48e3fc625e0f5) which fixed the issue :) Probably the package needs to be updated. Thanks
I went to fetch the latest snapshot, extracted it, changed PKGBUILD to that branch commit, then ran makepkg -si. It built successfully and I ran the yay waydroid again. Worked great as a workaround right now, but the package needs to be rebuilt.