summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatt Votava <mvnetbiz@gmail.com>2021-05-20 22:47:10 -0700
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-05-21 22:58:11 -0700
commitb9b3420febbdf3f3973c658234040f4506345600 (patch)
tree4820c623bc9449ff479d5edc9fb70f686c5dcd9b
parentd638c6a874d97a47295374aebb08f728530b2871 (diff)
python3Packages.pyvisa-py: init at 0.5.1
-rw-r--r--pkgs/development/python-modules/pyvisa-py/default.nix48
-rw-r--r--pkgs/development/python-modules/pyvisa/default.nix4
-rw-r--r--pkgs/top-level/python-packages.nix2
3 files changed, 52 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/pyvisa-py/default.nix b/pkgs/development/python-modules/pyvisa-py/default.nix
new file mode 100644
index 0000000000000..0c87af03ecce5
--- /dev/null
+++ b/pkgs/development/python-modules/pyvisa-py/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, fetchFromGitHub
+, buildPythonPackage
+, setuptools-scm
+, pyserial
+, pyusb
+, pyvisa
+, typing-extensions
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "pyvisa-py";
+  version = "0.5.1";
+
+  src = fetchFromGitHub {
+    owner = "pyvisa";
+    repo = "pyvisa-py";
+    rev = version;
+    hash = "sha256-V1BS+BvHVI8h/rynLnOHvQdIR6RwQrNa2p2S6GQug98=";
+  };
+
+  nativeBuildInputs = [
+    setuptools-scm
+  ];
+
+  propagatedBuildInputs = [
+    pyserial
+    pyusb
+    pyvisa
+    typing-extensions
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  postConfigure = ''
+    export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"
+  '';
+
+  meta = with lib; {
+    description = "PyVISA backend that implements a large part of the Virtual Instrument Software Architecture in pure Python";
+    homepage = "https://github.com/pyvisa/pyvisa-py";
+    license = licenses.mit;
+    maintainers = with maintainers; [ mvnetbiz ];
+  };
+}
diff --git a/pkgs/development/python-modules/pyvisa/default.nix b/pkgs/development/python-modules/pyvisa/default.nix
index 7cb159de87ca6..389adfbbb48cb 100644
--- a/pkgs/development/python-modules/pyvisa/default.nix
+++ b/pkgs/development/python-modules/pyvisa/default.nix
@@ -1,7 +1,7 @@
 { lib
 , fetchFromGitHub
 , buildPythonPackage
-, setuptools_scm
+, setuptools-scm
 , setuptools
 , typing-extensions
 , pytestCheckHook
@@ -19,7 +19,7 @@ buildPythonPackage rec {
   };
 
   nativeBuildInputs = [
-    setuptools_scm
+    setuptools-scm
   ];
 
   propagatedBuildInputs = [
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index aeb244c61d392..025f0b2ccb190 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -6907,6 +6907,8 @@ in {
 
   pyvisa = callPackage ../development/python-modules/pyvisa { };
 
+  pyvisa-py = callPackage ../development/python-modules/pyvisa-py { };
+
   pyviz-comms = callPackage ../development/python-modules/pyviz-comms { };
 
   pyvizio = callPackage ../development/python-modules/pyvizio { };