python3Packages.seabreeze: fix build, enable tests

This commit is contained in:
Martin Weinelt 2021-05-07 20:35:48 +02:00 committed by Jonathan Ringer
parent fcd5670a07
commit 50530ec8b8

View File

@ -1,8 +1,17 @@
{ lib { lib
, fetchFromGitHub , fetchFromGitHub
, buildPythonPackage , buildPythonPackage
, pyusb , cython
, git
, pkgconfig
, pytest-runner
, setuptools-scm
, future
, numpy , numpy
, pyusb
, mock
, pytestCheckHook
, zipp
}: }:
## Usage ## Usage
@ -18,19 +27,35 @@ buildPythonPackage rec {
owner = "ap--"; owner = "ap--";
repo = "python-seabreeze"; repo = "python-seabreeze";
rev = "v${version}"; rev = "v${version}";
sha256 = "1lna3w1vsci35dhyi7qjvbb99gxvzk23k195c7by7kkrps844q1j"; sha256 = "1hm9aalpb9sdp8s7ckn75xvyiacp5678pv9maybm5nz0z2h29ibq";
leaveDotGit = true;
}; };
nativeBuildInputs = [
cython
git
pkgconfig
pytest-runner
setuptools-scm
];
propagatedBuildInputs = [
future
numpy
pyusb
];
postInstall = '' postInstall = ''
mkdir -p $out/etc/udev/rules.d mkdir -p $out/etc/udev/rules.d
cp misc/10-oceanoptics.rules $out/etc/udev/rules.d/10-oceanoptics.rules cp os_support/10-oceanoptics.rules $out/etc/udev/rules.d/10-oceanoptics.rules
''; '';
# underlying c libraries are tested and fail # few backends enabled, but still some tests
# (c libs are used with anaconda, which we don't care about as we use the alternative path, being that of pyusb). checkInputs = [
doCheck = false; pytestCheckHook
mock
propagatedBuildInputs = [ pyusb numpy ]; zipp
];
setupPyBuildFlags = [ "--without-cseabreeze" ]; setupPyBuildFlags = [ "--without-cseabreeze" ];