Files
nixpkgs/pkgs/development/python-modules/azure-mgmt-resource-deploymentscripts/default.nix
T
ncaq 8284e302bb 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>
2026-02-17 09:39:53 +01:00

53 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
azure-mgmt-core,
azure-common,
isodate,
setuptools,
typing-extensions,
azure-cli,
}:
buildPythonPackage rec {
pname = "azure-mgmt-resource-deploymentscripts";
version = "1.0.0b1";
pyproject = true;
src = fetchPypi {
pname = "azure_mgmt_resource_deploymentscripts";
inherit version;
hash = "sha256-Vm2FWVPpSbsrNMtD4ecwVKqnkoHHRhO3Rf/duCyAI3U=";
};
build-system = [ setuptools ];
dependencies = [
azure-common
azure-mgmt-core
isodate
typing-extensions
];
# Module has no tests
doCheck = false;
pythonNamespaces = [
"azure.mgmt"
"azure.mgmt.resource"
];
pythonImportsCheck = [
"azure.mgmt.resource.deploymentscripts"
];
meta = {
description = "Microsoft Azure SDK for Python";
homepage = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/resources/azure-mgmt-resource-deploymentscripts";
changelog = "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-resource-deploymentscripts_${version}/sdk/resources/azure-mgmt-resource-deploymentscripts/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = azure-cli.meta.maintainers;
};
}