about summary refs log tree commit diff
path: root/pkgs/tools/admin/azure-cli
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2021-11-20 15:23:17 -0800
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-11-23 21:53:03 -0800
commitcee6c6ca4e65fa0c5931968bd03e404ba3436072 (patch)
tree13997d3c4c2889afa4b363431653849138fe6a27 /pkgs/tools/admin/azure-cli
parent8d96e200dde3083c412d09f8d9bd6abf4116d141 (diff)
azure-cli: remove PEP420 patching to azure packages
Diffstat (limited to 'pkgs/tools/admin/azure-cli')
-rw-r--r--pkgs/tools/admin/azure-cli/python-packages.nix21
1 files changed, 3 insertions, 18 deletions
diff --git a/pkgs/tools/admin/azure-cli/python-packages.nix b/pkgs/tools/admin/azure-cli/python-packages.nix
index 46e0f3726ad85..2b820aa956997 100644
--- a/pkgs/tools/admin/azure-cli/python-packages.nix
+++ b/pkgs/tools/admin/azure-cli/python-packages.nix
@@ -1,24 +1,7 @@
 { stdenv, python, lib, src, version }:
 
 let
-  buildAzureCliPackage = with py.pkgs; attrs: buildPythonPackage (attrs // {
-    # Remove overly restrictive version contraints and obsolete namespace setup
-    prePatch = (attrs.prePatch or "") + ''
-      rm -f azure_bdist_wheel.py tox.ini
-      substituteInPlace setup.py \
-        --replace "cryptography>=3.2,<3.4" "cryptography"
-      sed -i "/azure-namespace-package/c\ " setup.cfg
-    '';
-
-    # Prevent these __init__'s from violating PEP420, only needed for python2
-    pythonNamespaces = [ "azure.cli" ];
-
-    checkInputs = [ mock pytest ] ++ (attrs.checkInputs or []);
-    checkPhase = attrs.checkPhase or ''
-      cd azure
-      HOME=$TMPDIR pytest
-    '';
-  });
+  buildAzureCliPackage = with py.pkgs; attrs: buildPythonPackage attrs;
 
   overrideAzureMgmtPackage = package: version: extension: sha256:
     # check to make sure overriding is even necessary
@@ -91,6 +74,7 @@ let
             --replace "cryptography>=3.2,<3.4" "cryptography"
         '';
 
+        checkInputs = with self; [ pytest ];
         doCheck = stdenv.isLinux;
         # ignore tests that does network call, or assume powershell
         checkPhase = ''
@@ -127,6 +111,7 @@ let
             --replace "portalocker~=1.6" "portalocker"
         '';
 
+        checkInputs = [ py.pkgs.pytest ];
         # ignore flaky test
         checkPhase = ''
           cd azure