Unverified Commit cfa9d2a0 authored by nicoo's avatar nicoo Committed by GitHub
Browse files

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

parents 59e342fb 3b3b0b47
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -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" ];