python311Packages.pyvisa-py: modernize

This commit is contained in:
Nick Cao
2023-11-11 09:13:49 -05:00
parent 068bd65449
commit 0d38e14ce8
@@ -1,11 +1,15 @@
{ lib
, fetchFromGitHub
, buildPythonPackage
, setuptools
, setuptools-scm
, gpib-ctypes
, pyserial
, pyusb
, pyvisa
, typing-extensions
, psutil
, zeroconf
, pytestCheckHook
, pythonOlder
}:
@@ -13,9 +17,9 @@
buildPythonPackage rec {
pname = "pyvisa-py";
version = "0.7.1";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "pyvisa";
@@ -25,23 +29,29 @@ buildPythonPackage rec {
};
nativeBuildInputs = [
setuptools
setuptools-scm
];
propagatedBuildInputs = [
pyserial
pyusb
pyvisa
typing-extensions
];
passthru.optional-dependencies = {
gpib-ctypes = [ gpib-ctypes ];
serial = [ pyserial ];
usb = [ pyusb ];
psutil = [ psutil ];
hislip-discovery = [ zeroconf ];
# vicp = [ pyvicp zeroconf ];
};
nativeCheckInputs = [
pytestCheckHook
];
postConfigure = ''
export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"
'';
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
meta = with lib; {
description = "Module that implements the Virtual Instrument Software Architecture";