From 8284e302bba64b8b1372ff896bad4025b635312d Mon Sep 17 00:00:00 2001 From: ncaq Date: Sat, 14 Feb 2026 13:13:05 +0900 Subject: [PATCH] python3Packages.azure-mgmt-resource-{deployments,deploymentscripts,deploymentstacks,templatespecs}: fix deleting leaf module `__init__.py` pythonNamespacesHook removes `__init__.py` at every level of the specified namespace paths. Including the leaf module itself (e.g. "azure.mgmt.resource.deployments") causes its `__init__.py` to be deleted, even though it contains actual module code (re-exports like DeploymentsMgmtClient). This results in runtime import errors in azure-cli. Fix by specifying only the ancestor namespace packages ("azure.mgmt" and "azure.mgmt.resource") instead of the leaf module, consistent with the parent azure-mgmt-resource package. close #490035 Signed-off-by: ncaq --- .../python-modules/azure-mgmt-resource-deployments/default.nix | 3 ++- .../azure-mgmt-resource-deploymentscripts/default.nix | 3 ++- .../azure-mgmt-resource-deploymentstacks/default.nix | 3 ++- .../azure-mgmt-resource-templatespecs/default.nix | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/azure-mgmt-resource-deployments/default.nix b/pkgs/development/python-modules/azure-mgmt-resource-deployments/default.nix index 20d41be0f289..27dec75acb88 100644 --- a/pkgs/development/python-modules/azure-mgmt-resource-deployments/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-resource-deployments/default.nix @@ -34,7 +34,8 @@ buildPythonPackage rec { doCheck = false; pythonNamespaces = [ - "azure.mgmt.resource.deployments" + "azure.mgmt" + "azure.mgmt.resource" ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/azure-mgmt-resource-deploymentscripts/default.nix b/pkgs/development/python-modules/azure-mgmt-resource-deploymentscripts/default.nix index 5c04749ea59f..722aace9cc8f 100644 --- a/pkgs/development/python-modules/azure-mgmt-resource-deploymentscripts/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-resource-deploymentscripts/default.nix @@ -34,7 +34,8 @@ buildPythonPackage rec { doCheck = false; pythonNamespaces = [ - "azure.mgmt.resource.deploymentscripts" + "azure.mgmt" + "azure.mgmt.resource" ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/azure-mgmt-resource-deploymentstacks/default.nix b/pkgs/development/python-modules/azure-mgmt-resource-deploymentstacks/default.nix index 4da8dd3b756c..6b7c2065c2c9 100644 --- a/pkgs/development/python-modules/azure-mgmt-resource-deploymentstacks/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-resource-deploymentstacks/default.nix @@ -34,7 +34,8 @@ buildPythonPackage rec { doCheck = false; pythonNamespaces = [ - "azure.mgmt.resource.deploymentstacks" + "azure.mgmt" + "azure.mgmt.resource" ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/azure-mgmt-resource-templatespecs/default.nix b/pkgs/development/python-modules/azure-mgmt-resource-templatespecs/default.nix index 38a193ecde39..62dedac6bf64 100644 --- a/pkgs/development/python-modules/azure-mgmt-resource-templatespecs/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-resource-templatespecs/default.nix @@ -34,7 +34,8 @@ buildPythonPackage rec { doCheck = false; pythonNamespaces = [ - "azure.mgmt.resource.templatespecs" + "azure.mgmt" + "azure.mgmt.resource" ]; pythonImportsCheck = [