1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, setuptools-scm
5, pyserial
6, pyusb
7, pyvisa
8, typing-extensions
9, pytestCheckHook
10, pythonOlder
11}:
12
13buildPythonPackage rec {
14 pname = "pyvisa-py";
15 version = "0.7.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "pyvisa";
22 repo = "pyvisa-py";
23 rev = "refs/tags/${version}";
24 hash = "sha256-wMDO0CUCSSCB8cXvTmIEWD8OGMZRZNhmmRx+fZnK288=";
25 };
26
27 nativeBuildInputs = [
28 setuptools-scm
29 ];
30
31 propagatedBuildInputs = [
32 pyserial
33 pyusb
34 pyvisa
35 typing-extensions
36 ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 ];
41
42 postConfigure = ''
43 export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"
44 '';
45
46 meta = with lib; {
47 description = "Module that implements the Virtual Instrument Software Architecture";
48 homepage = "https://github.com/pyvisa/pyvisa-py";
49 changelog = "https://github.com/pyvisa/pyvisa-py/blob/${version}/CHANGES";
50 license = licenses.mit;
51 maintainers = with maintainers; [ mvnetbiz ];
52 };
53}