1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, setuptools-scm
5, setuptools
6, typing-extensions
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "pyvisa";
13 version = "1.13.0";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "pyvisa";
19 repo = "pyvisa";
20 rev = "refs/tags/${version}";
21 hash = "sha256-TBu3Xko0IxFBT2vzrsOxqEG3y4XfPzISEtbkWkIaCvM=";
22 };
23
24 nativeBuildInputs = [
25 setuptools-scm
26 ];
27
28 propagatedBuildInputs = [
29 typing-extensions
30 setuptools
31 ];
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 ];
36
37 # Test can't find cli tool bin path correctly
38 disabledTests = [
39 "test_visa_info"
40 ];
41
42 postConfigure = ''
43 export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"
44 '';
45
46 meta = with lib; {
47 description = "Python package for support of the Virtual Instrument Software Architecture (VISA)";
48 homepage = "https://github.com/pyvisa/pyvisa";
49 license = licenses.mit;
50 maintainers = with maintainers; [ mvnetbiz ];
51 };
52}