evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / gpib-ctypes / default.nix
blob98feeb7749fa400181935f8b4c176c804f9f282b
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchPypi,
6   pytestCheckHook,
7   linux-gpib,
8 }:
10 buildPythonPackage rec {
11   pname = "gpib-ctypes";
12   version = "0.3.0";
13   format = "setuptools";
15   disabled = pythonOlder "3.7";
17   src = fetchPypi {
18     pname = "gpib_ctypes";
19     inherit version;
20     hash = "sha256-c9l6TNmM4PtbvopnnFi5R1dQ9o3MI39BHHHPSGqfjCY=";
21   };
23   nativeCheckInputs = [ pytestCheckHook ];
25   postPatch = ''
26     substituteInPlace gpib_ctypes/gpib/gpib.py \
27       --replace "libgpib.so.0" "${linux-gpib}/lib/libgpib.so.0"
28     substituteInPlace setup.py \
29       --replace "'pytest-runner'," ""
30   '';
32   pythonImportsCheck = [ "gpib_ctypes.gpib" ];
34   meta = with lib; {
35     description = "Cross-platform Python bindings for the NI GPIB and linux-gpib C interfaces";
36     homepage = "https://github.com/tivek/gpib_ctypes/";
37     changelog = "https://github.com/tivek/gpib_ctypes/blob/${version}/HISTORY.rst";
38     license = licenses.gpl2Only;
39     maintainers = with maintainers; [ fsagbuya ];
40   };