about summary refs log tree commit diff
path: root/pkgs/development/python-modules/msrestazure/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/msrestazure/default.nix')
-rw-r--r--pkgs/development/python-modules/msrestazure/default.nix53
1 files changed, 32 insertions, 21 deletions
diff --git a/pkgs/development/python-modules/msrestazure/default.nix b/pkgs/development/python-modules/msrestazure/default.nix
index e564a0fd5959..b997cd9b5065 100644
--- a/pkgs/development/python-modules/msrestazure/default.nix
+++ b/pkgs/development/python-modules/msrestazure/default.nix
@@ -1,41 +1,52 @@
-{ pkgs
-, lib
+{ lib
+, adal
 , buildPythonPackage
 , fetchFromGitHub
-, isPy3k
-, adal
-, msrest
-, mock
 , httpretty
-, pytest
+, mock
+, msrest
 , pytest-asyncio
+, pytestCheckHook
+, pythonOlder
+, setuptools
 }:
 
 buildPythonPackage rec {
-  version = "0.6.4";
-  format = "setuptools";
   pname = "msrestazure";
+  version = "0.6.4";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
 
-  # Pypi tarball doesnt include tests
-  # see https://github.com/Azure/msrestazure-for-python/pull/133
   src = fetchFromGitHub {
     owner = "Azure";
     repo = "msrestazure-for-python";
-    rev = "v${version}";
-    sha256 = "0ik81f0n6r27f02gblgm0vl5zl3wc6ijsscihgvc1fgm9f5mk5b5";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-ZZVZi0v1ucD2g5FpLaNhfNBf6Ab10fUEcEdkY4ELaEY=";
   };
 
-  propagatedBuildInputs = [ adal msrest ];
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  propagatedBuildInputs = [
+    adal
+    msrest
+  ];
 
-  nativeCheckInputs = [ httpretty mock pytest ]
-                ++ lib.optionals isPy3k [ pytest-asyncio ];
+  nativeCheckInputs = [
+    httpretty
+    mock
+    pytest-asyncio
+    pytestCheckHook
+  ];
 
-  checkPhase = ''
-    pytest tests/
-  '';
+  pythonImportsCheck = [
+    "msrest"
+  ];
 
-  meta = with pkgs.lib; {
-    description = "The runtime library 'msrestazure' for AutoRest generated Python clients.";
+  meta = with lib; {
+    description = "The runtime library 'msrestazure' for AutoRest generated Python clients";
     homepage = "https://azure.microsoft.com/en-us/develop/python/";
     license = licenses.mit;
     maintainers = with maintainers; [ bendlas jonringer ];