Found this while installing using uv.
Installing with the command:
uv add "git+https://github.com/bastibe/python-soundfile"
uv builds the wheel locally when installing from github. The build succeed and the wheel installs but the wheel is missing _soundfile_data\libsndfile_x64.dll which results in the following error when python-soundfile is imported:
OSError: cannot load library 'c:\Repos\5g-obp\low-phy\phase-2-channelizer-app\main\.venv\Lib\site-packages\_soundfile_data\libsndfile_x64.dll': error 0x7e
setup.py detects platform and architecture0 if environment variables PYSOUNDFILE_PLATFORM and PYSOUNDFILE_ARCHITECTURE are not present. On Windows, architecture0 = platform.architecture()[0] returns '64bit' or '32bit'.
architecture0 is used directly to construct the library name libname. This results in libname == 'libsndfile_64bit.dll' or libname == 'libsndfile_32bit.dll'. This does not correspond to the files libsndfile_x86.dll and libsndfile_x64.dll under __soundfile_data/_, therefore the locally built wheel does not contain the libsndfile DLL.
Fix for uv is to add the following to my uv.toml but this is only a temporary work around:
extra-build-variables = { soundfile = { PYSOUNDFILE_PLATFORM = "win32", PYSOUNDFILE_ARCHITECTURE = "x64" } }
Found this while installing using uv.
Installing with the command:
uv builds the wheel locally when installing from github. The build succeed and the wheel installs but the wheel is missing _soundfile_data\libsndfile_x64.dll which results in the following error when python-soundfile is imported:
setup.py detects
platformandarchitecture0if environment variablesPYSOUNDFILE_PLATFORMandPYSOUNDFILE_ARCHITECTUREare not present. On Windows,architecture0 = platform.architecture()[0]returns '64bit' or '32bit'.architecture0is used directly to construct the library namelibname. This results inlibname == 'libsndfile_64bit.dll' orlibname == 'libsndfile_32bit.dll'. This does not correspond to the files libsndfile_x86.dll and libsndfile_x64.dll under __soundfile_data/_, therefore the locally built wheel does not contain the libsndfile DLL.Fix for uv is to add the following to my uv.toml but this is only a temporary work around: