python3.pkgs.pysls: Fix build (#389972)

This commit is contained in:
nicoo
2025-03-15 00:50:58 +00:00
committed by GitHub
@@ -3,7 +3,10 @@
liblsl,
fetchFromGitHub,
buildPythonPackage,
stdenv,
numpy,
setuptools,
setuptools-scm,
wheel,
}:
@@ -20,16 +23,22 @@ buildPythonPackage rec {
};
postPatch = ''
substituteInPlace pylsl/pylsl.py \
--replace "def find_liblsl_libraries(verbose=False):" "$(echo -e "def find_liblsl_libraries(verbose=False):\n yield '${liblsl}/lib/liblsl.so'")"
substituteInPlace src/pylsl/lib/__init__.py \
--replace "def find_liblsl_libraries(verbose=False):" "$(echo -e "def find_liblsl_libraries(verbose=False):\n yield '${liblsl}/lib/liblsl.${
if stdenv.hostPlatform.isDarwin then "dylib" else "so"
}'")"
'';
nativeBuildInputs = [
build-system = [
setuptools
setuptools-scm
wheel
];
buildImputs = [ liblsl ];
dependencies = [
liblsl
numpy
];
pythonImportsCheck = [ "pylsl" ];