-
-
Notifications
You must be signed in to change notification settings - Fork 138
Description
Hi RapidFuzz team,
I'm currently trying to run the tests after building the library from source, but I'm encountering a DLL load failed error
on import. Below is a summary of my setup and the steps I followed.
Environment :
OS: Windows 11
Python: 3.12.11
Toolchain: msys2 with mingw-w64, ninja, cmake
What I Did:
- Installed the toolchain via MSYS2:
pacman -Syu
pacman -S mingw-w64-x86_64-toolchain cmake ninja
- Set the environment variables in PowerShell:
$env:CC = "C:\msys64\mingw64\bin\gcc.exe"
$env:CXX = "C:\msys64\mingw64\bin\g++.exe"
$env:PATH = "C:\msys64\mingw64\bin;$env:PATH"
- Cloned the repo and installed the library:
git clone --recursive https://github.com/rapidfuzz/rapidfuzz.git
cd rapidfuzz
pip install . --verbose
Result : Installation completed successfully.
- Installed test dependencies:
pip install pytest hypothesis
The Issue :
When I run the tests:
pytest -v tests
I get the following error:
ImportError while importing test module ...
ImportError: DLL load failed while importing process_cpp_impl: The specified module could not be found.
Running:
Get-ChildItem -Recurse -Filter *.pyd
...returns nothing
Prior Attempt (MinGW)
Before switching to MSYS2, I tried using MinGW but the installation failed with a CMake error (The C compiler ... is not able to compile a simple test program
). So I switched to MSYS2 and Ninja, which completed the install.
I’m not experienced with build systems, so I may be missing something obvious. Could you please advise the correct way to:
- Build the package locally (with C++ extensions),
- Ensure the compiled files are placed in the right location,
- Run the full test suite with pytest?
P.S.
If there are any recommended resources or documentation that explain RapidFuzz’s internal algorithms, data flow, or overall architecture, I’d greatly appreciate it if you could point me in that direction. My goal is to understand the library in-depth and potentially contribute in the future.
Thanks in advance for your support!