1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 setuptools,
6 setuptools-scm,
7 gpib-ctypes,
8 pyserial,
9 pyusb,
10 pyvisa,
11 typing-extensions,
12 psutil,
13 zeroconf,
14 pytestCheckHook,
15 pythonOlder,
16}:
17
18buildPythonPackage rec {
19 pname = "pyvisa-py";
20 version = "0.7.2";
21 pyproject = true;
22
23 disabled = pythonOlder "3.8";
24
25 src = fetchFromGitHub {
26 owner = "pyvisa";
27 repo = "pyvisa-py";
28 rev = "refs/tags/${version}";
29 hash = "sha256-UFAKLrZ1ZrTmFXwVuyTCPVo3Y1YIDOvkx5krpsz71BM=";
30 };
31
32 nativeBuildInputs = [
33 setuptools
34 setuptools-scm
35 ];
36
37 propagatedBuildInputs = [
38 pyvisa
39 typing-extensions
40 ];
41
42 passthru.optional-dependencies = {
43 gpib-ctypes = [ gpib-ctypes ];
44 serial = [ pyserial ];
45 usb = [ pyusb ];
46 psutil = [ psutil ];
47 hislip-discovery = [ zeroconf ];
48 # vicp = [ pyvicp zeroconf ];
49 };
50
51 nativeCheckInputs = [ pytestCheckHook ];
52
53 meta = with lib; {
54 description = "Module that implements the Virtual Instrument Software Architecture";
55 homepage = "https://github.com/pyvisa/pyvisa-py";
56 changelog = "https://github.com/pyvisa/pyvisa-py/blob/${version}/CHANGES";
57 license = licenses.mit;
58 maintainers = with maintainers; [ mvnetbiz ];
59 };
60}