8284e302bb
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>
53 lines
1.2 KiB
Nix
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;
|
|
};
|
|
}
|