pure Python mode fails to import
maxbachmann opened this issue · comments
This was reported here: python-poetry/poetry#6078
It should be relatively simple to add these missing functions to the pure Python version.
@pekkarr how does the aur ship packages? If it ships binaries those appear to be broken otherwise it would not even attempt to use the pure Python fallback version. You might want to set the environment variable RAPIDFUZZ_BUILD_EXTENSION
while packaging to make sure that when a build error occurs it does not simply package the pure Python version.
AUR doesn't ship binaries. It contains build scripts that download the source, compile it and make Arch packages that can be installed via Arch's package manager, pacman. The build script for RapidFuzz can be found here.
The build sets RAPIDFUZZ_BUILD_EXTENSION=1
when calling python -m build
, which should ensure that the build fails when scikit-build fails.
I'll continue to investigate the issue.
From the error message it appears it does not find the so files for this user. However the immediate issue should be fixed with: 2412e57
Not sure whether this is relevant, but @AkechiShiro writes that he installed python-rapidfuzz-git
. I am unsure how the two aur packages are related to each other: https://aur.archlinux.org/packages/python-rapidfuzz / https://aur.archlinux.org/packages/python-rapidfuzz-git
he installed
python-rapidfuzz-git
That's the issue then, the python-rapidfuzz-git
package is severely outdated and doesn't ensure that scikit-build is installed during build, which is the cause of the issue. I'll contact the maintainer of the package.
In the meantime, the best solution is to use the python-rapidfuzz
package.
Yes but the error indicates that the version he actually uses is a lot newer. The whole fallback behavior was only added in v2.1.0
. Maybe something breaks when installing both of them?
The -git
suffix means that the build source is always the head of the main git branch. So the source code is the latest but the build script was made before 2.0.0 was released and doesn't have scikit-build.
The -git suffix means that the build source is always the head of the main git branch
This sounds awful. There is no guarantee for the main branch to be working properly between releases. Thanks for the explanation.
This sounds awful.
Yes, -git
packages are very unstable.
Thanks for your help in figuring this out.
@pekkarr @AkechiShiro It appears the package was added to the normal archlinux package repository as well: https://archlinux.org/packages/community/x86_64/python-rapidfuzz/
Yes, it's now official Arch package and the AUR package will be removed soon. The -git
version still stays in the AUR.