summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatt Votava <mvnetbiz@gmail.com>2021-05-20 22:46:14 -0700
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-05-21 22:58:11 -0700
commitd638c6a874d97a47295374aebb08f728530b2871 (patch)
tree9a0bd3ec9763dc404ee15bacda6a751d226510f5
parent4d46cb67ad21c068b28618dfa0ffa6fa1aa8b057 (diff)
python3Packages.pyvisa: init at 1.11.3
-rw-r--r--pkgs/development/python-modules/pyvisa/default.nix49
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pyvisa/default.nix b/pkgs/development/python-modules/pyvisa/default.nix
new file mode 100644
index 0000000000000..7cb159de87ca6
--- /dev/null
+++ b/pkgs/development/python-modules/pyvisa/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, fetchFromGitHub
+, buildPythonPackage
+, setuptools_scm
+, setuptools
+, typing-extensions
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "pyvisa";
+  version = "1.11.3";
+
+  src = fetchFromGitHub {
+    owner = "pyvisa";
+    repo = "pyvisa";
+    rev = version;
+    hash = "sha256-Qe7W1zPI1aedLDnhkLTDPTa/lsNnCGik5Hu+jLn+meA=";
+  };
+
+  nativeBuildInputs = [
+    setuptools_scm
+  ];
+
+  propagatedBuildInputs = [
+    typing-extensions
+    setuptools
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  # Test can't find cli tool bin path correctly
+  disabledTests = [
+    "test_visa_info"
+  ];
+
+  postConfigure = ''
+    export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"
+  '';
+
+  meta = with lib; {
+    description = "Python package for support of the Virtual Instrument Software Architecture (VISA)";
+    homepage = "https://github.com/pyvisa/pyvisa";
+    license = licenses.mit;
+    maintainers = with maintainers; [ mvnetbiz ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 55b29f6df9269..aeb244c61d392 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -6905,6 +6905,8 @@ in {
 
   pyvicare = callPackage ../development/python-modules/pyvicare { };
 
+  pyvisa = callPackage ../development/python-modules/pyvisa { };
+
   pyviz-comms = callPackage ../development/python-modules/pyviz-comms { };
 
   pyvizio = callPackage ../development/python-modules/pyvizio { };