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