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 <ncaq@ncaq.net>
This commit is contained in:
@@ -34,7 +34,8 @@ buildPythonPackage rec {
|
||||
doCheck = false;
|
||||
|
||||
pythonNamespaces = [
|
||||
"azure.mgmt.resource.deployments"
|
||||
"azure.mgmt"
|
||||
"azure.mgmt.resource"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
|
||||
@@ -34,7 +34,8 @@ buildPythonPackage rec {
|
||||
doCheck = false;
|
||||
|
||||
pythonNamespaces = [
|
||||
"azure.mgmt.resource.deploymentscripts"
|
||||
"azure.mgmt"
|
||||
"azure.mgmt.resource"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
|
||||
@@ -34,7 +34,8 @@ buildPythonPackage rec {
|
||||
doCheck = false;
|
||||
|
||||
pythonNamespaces = [
|
||||
"azure.mgmt.resource.deploymentstacks"
|
||||
"azure.mgmt"
|
||||
"azure.mgmt.resource"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
|
||||
@@ -34,7 +34,8 @@ buildPythonPackage rec {
|
||||
doCheck = false;
|
||||
|
||||
pythonNamespaces = [
|
||||
"azure.mgmt.resource.templatespecs"
|
||||
"azure.mgmt"
|
||||
"azure.mgmt.resource"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
|
||||
Reference in New Issue
Block a user