diff options
author | Jonathan Ringer <jonringer117@gmail.com> | 2021-12-05 22:06:32 -0800 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2021-12-09 19:33:03 -0800 |
commit | 3f01341c8a9250c771a3b76eb458ba3ae346b3f9 (patch) | |
tree | 72f6e89d026b5d681005082114bde620ef5e9801 /pkgs/tools/admin/azure-cli | |
parent | 427912ea93fc9f4025b2565171389b89588a0c1e (diff) |
azure-cli: python -> python3 renaming, remove optional py2 deps
To avoid python2 false positives
Diffstat (limited to 'pkgs/tools/admin/azure-cli')
-rw-r--r-- | pkgs/tools/admin/azure-cli/default.nix | 3 | ||||
-rw-r--r-- | pkgs/tools/admin/azure-cli/python-packages.nix | 9 |
2 files changed, 5 insertions, 7 deletions
diff --git a/pkgs/tools/admin/azure-cli/default.nix b/pkgs/tools/admin/azure-cli/default.nix index 4034ac315642b..728fcf6eec5b4 100644 --- a/pkgs/tools/admin/azure-cli/default.nix +++ b/pkgs/tools/admin/azure-cli/default.nix @@ -14,8 +14,7 @@ let # put packages that needs to be overriden in the py package scope py = import ./python-packages.nix { - inherit stdenv lib src version; - python = python3; + inherit stdenv lib src version python3; }; in py.pkgs.toPythonApplication (py.pkgs.buildAzureCliPackage { diff --git a/pkgs/tools/admin/azure-cli/python-packages.nix b/pkgs/tools/admin/azure-cli/python-packages.nix index 2b820aa956997..1541e796272d9 100644 --- a/pkgs/tools/admin/azure-cli/python-packages.nix +++ b/pkgs/tools/admin/azure-cli/python-packages.nix @@ -1,4 +1,4 @@ -{ stdenv, python, lib, src, version }: +{ stdenv, python3, lib, src, version }: let buildAzureCliPackage = with py.pkgs; attrs: buildPythonPackage attrs; @@ -25,7 +25,7 @@ let pythonNamespaces = [ "azure.mgmt" ]; }); - py = python.override { + py = python3.override { packageOverrides = self: super: { inherit buildAzureCliPackage; @@ -38,6 +38,7 @@ let propagatedBuildInputs = with self; [ adal + antlr4-python3-runtime argcomplete azure-common azure-cli-telemetry @@ -63,9 +64,7 @@ let requests six tabulate - ] - ++ lib.optionals isPy3k [ antlr4-python3-runtime ] - ++ lib.optionals (!isPy3k) [ enum34 futures antlr4-python2-runtime ndg-httpsclient ]; + ]; postPatch = '' substituteInPlace setup.py \ |