azure-cli: use pythonNamespaces
This commit is contained in:
parent
a9c994ad0b
commit
9c8565f731
@ -11,10 +11,7 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
# Prevent these __init__'s from violating PEP420, only needed for python2
|
# Prevent these __init__'s from violating PEP420, only needed for python2
|
||||||
postInstall = (attrs.postInstall or "") + ''
|
pythonNamespaces = [ "azure.cli" ];
|
||||||
rm $out/${python.sitePackages}/azure/{,__pycache__/}__init__.* \
|
|
||||||
$out/${python.sitePackages}/azure/cli/{,__pycache__/}__init__.*
|
|
||||||
'';
|
|
||||||
|
|
||||||
checkInputs = [ mock pytest ] ++ (attrs.checkInputs or []);
|
checkInputs = [ mock pytest ] ++ (attrs.checkInputs or []);
|
||||||
checkPhase = attrs.checkPhase or ''
|
checkPhase = attrs.checkPhase or ''
|
||||||
@ -39,9 +36,7 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
# force PEP420
|
# force PEP420
|
||||||
postInstall = ''
|
pythonNamespaces = [ "azure.mgmt" ];
|
||||||
rm -f $out/${py.sitePackages}/azure/{,mgmt/}__init__.py
|
|
||||||
'';
|
|
||||||
});
|
});
|
||||||
|
|
||||||
py = python.override {
|
py = python.override {
|
||||||
@ -271,9 +266,7 @@ let
|
|||||||
propagatedBuildInputs = with self; [
|
propagatedBuildInputs = with self; [
|
||||||
azure-common azure-nspkg msrest msrestazure cryptography
|
azure-common azure-nspkg msrest msrestazure cryptography
|
||||||
];
|
];
|
||||||
postInstall = ''
|
pythonNamespaces = [ "azure" ];
|
||||||
rm -f $out/${self.python.sitePackages}/azure/__init__.py
|
|
||||||
'';
|
|
||||||
pythonImportsCheck = [ ];
|
pythonImportsCheck = [ ];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user