pythonPackages.azure*: use pythonNamespaces

This commit is contained in:
Jonathan Ringer 2020-03-17 15:43:56 -07:00 committed by Jon
parent 9c8565f731
commit cf0f90b85e
25 changed files with 35 additions and 100 deletions

View file

@ -17,9 +17,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ six requests ];
postInstall = ''
rm $out/${python.sitePackages}/azure/__init__.py
'';
pythonNamespaces = [ "azure" ];
# requires an active Azure Cosmos service
doCheck = false;

View file

@ -26,6 +26,8 @@ buildPythonPackage rec {
cryptography
];
pythonNamespaces = [ "azure.keyvault" ];
# requires relative paths to utilities in the mono-repo
doCheck = false;
checkInputs = [ aiohttp pytestCheckHook ];

View file

@ -21,6 +21,8 @@ buildPythonPackage rec {
msrest
];
pythonNamespaces = [ "azure.keyvault" ];
# requires checkout from mono-repo
doCheck = false;

View file

@ -22,6 +22,8 @@ buildPythonPackage rec {
# this is just a meta package, which contains keys and secrets
doCheck = false;
pythonNamespaces = [ "azure" ];
pythonImportsCheck = [
"azure.keyvault.keys"
"azure.keyvault.secrets"

View file

@ -22,9 +22,7 @@ buildPythonPackage rec {
azure-common
];
postInstall = lib.optionalString isPy3k ''
rm -rf $out/${python.sitePackages}/azure/__init__.py
'';
pythonNamespaces = [ "azure" ];
# has no tests
doCheck = false;

View file

@ -27,9 +27,7 @@ buildPythonPackage rec {
azure-mgmt-nspkg
];
postInstall = lib.optionalString isPy3k ''
rm -f $out/${python.sitePackages}/azure/{,mgmt/}__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -24,10 +24,7 @@ buildPythonPackage rec {
azure-mgmt-nspkg
];
postInstall = lib.optionalString isPy3k ''
rm $out/${python.sitePackages}/azure/__init__.py
rm $out/${python.sitePackages}/azure/mgmt/__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -30,10 +30,7 @@ buildPythonPackage rec {
--replace "azure-namespace-package = azure-mgmt-nspkg" ""
'';
postInstall = lib.optionalString isPy3k ''
rm $out/${python.sitePackages}/azure/__init__.py
rm $out/${python.sitePackages}/azure/mgmt/__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -16,15 +16,12 @@ buildPythonPackage rec {
sha256 = "1s3bx6knxw5dxycp43yimvgrh0i19drzd09asglcwz2x5mr3bpyg";
};
postInstall = if isPy3k then "" else ''
echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py
echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py
'';
propagatedBuildInputs = [
azure-mgmt-common
];
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -24,11 +24,7 @@ buildPythonPackage rec {
azure-mgmt-nspkg
];
# still needed when overriding to previous versions
# E.g. azure-cli
postInstall = lib.optionalString isPy3k ''
rm -f $out/${python.sitePackages}/azure/{,mgmt/}__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -24,11 +24,7 @@ buildPythonPackage rec {
azure-mgmt-datalake-nspkg
];
postInstall = lib.optionalString isPy3k ''
rm $out/${python.sitePackages}/azure/__init__.py
rm $out/${python.sitePackages}/azure/mgmt/__init__.py
rm $out/${python.sitePackages}/azure/mgmt/datalake/__init__.py
'';
pythonNamespaces = [ "azure.mgmt.datalake" ];
# has no tests
doCheck = false;

View file

@ -3,6 +3,7 @@
, fetchPypi
, python
, isPy3k
, pythonNamespacesHook
, msrestazure
, azure-common
, azure-mgmt-datalake-nspkg
@ -24,11 +25,7 @@ buildPythonPackage rec {
azure-mgmt-datalake-nspkg
];
postInstall = lib.optionalString isPy3k ''
rm $out/${python.sitePackages}/azure/__init__.py
rm $out/${python.sitePackages}/azure/mgmt/__init__.py
rm $out/${python.sitePackages}/azure/mgmt/datalake/__init__.py
'';
pythonNamespaces = [ "azure.mgmt.datalake" ];
# has no tests
doCheck = false;

View file

@ -27,11 +27,7 @@ buildPythonPackage rec {
azure-mgmt-nspkg
];
# still needed when overriding to previous versions
# E.g. azure-cli
postInstall = lib.optionalString isPy3k ''
rm -f $out/${python.sitePackages}/azure/{,mgmt/}__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -27,11 +27,7 @@ buildPythonPackage rec {
azure-mgmt-nspkg
];
# still needed when overriding to previous versions
# E.g. azure-cli
postInstall = lib.optionalString isPy3k ''
rm -f $out/${python.sitePackages}/azure/{,mgmt/}__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -27,10 +27,7 @@ buildPythonPackage rec {
];
# this is still needed for when the version is overrided
# to previous versions. E.g azure-cli
postInstall = lib.optionalString isPy3k ''
rm -f $out/${python.sitePackages}/azure/{,mgmt/}__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -26,10 +26,7 @@ buildPythonPackage rec {
azure-mgmt-nspkg
];
postInstall = lib.optionalString isPy3k ''
rm $out/${python.sitePackages}/azure/__init__.py
rm $out/${python.sitePackages}/azure/mgmt/__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -26,11 +26,7 @@ buildPythonPackage rec {
azure-mgmt-nspkg
];
# this is still need when overriding to prevoius versions
# E.g. azure-cli
postInstall = lib.optionalString isPy3k ''
rm -f $out/${python.sitePackages}/azure/{,mgmt/}__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -26,10 +26,7 @@ buildPythonPackage rec {
azure-mgmt-nspkg
];
postInstall = lib.optionalString isPy3k ''
rm $out/${python.sitePackages}/azure/__init__.py
rm $out/${python.sitePackages}/azure/mgmt/__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -26,10 +26,7 @@ buildPythonPackage rec {
azure-mgmt-nspkg
];
postInstall = lib.optionalString isPy3k ''
rm $out/${python.sitePackages}/azure/__init__.py
rm $out/${python.sitePackages}/azure/mgmt/__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -27,10 +27,7 @@ buildPythonPackage rec {
azure-mgmt-nspkg
];
postInstall = lib.optionalString isPy3k ''
rm -rf $out/${python.sitePackages}/azure/__init__.py
rm -rf $out/${python.sitePackages}/azure/mgmt/__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -26,11 +26,7 @@ buildPythonPackage rec {
azure-mgmt-nspkg
];
# still needed when overriding to previous versions
# E.g. azure-cli
postInstall = lib.optionalString isPy3k ''
rm -f $out/${python.sitePackages}/azure/{,mgmt/}__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -24,11 +24,7 @@ buildPythonPackage rec {
azure-mgmt-nspkg
];
# still needed when overriding to previous versions
# E.g. azure-cli
postInstall = lib.optionalString isPy3k ''
rm -f $out/${python.sitePackages}/azure/{,mgmt/}__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -26,11 +26,7 @@ buildPythonPackage rec {
azure-mgmt-nspkg
];
# this is still needed for overriding to previous versions
# E.g azure-cli
postInstall = lib.optionalString isPy3k ''
rm -f $out/${python.sitePackages}/azure/{,mgmt/}__init__.py
'';
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;

View file

@ -7,22 +7,19 @@
}:
buildPythonPackage rec {
version = "7.2.0";
version = "8.0.0";
pname = "azure-mgmt-storage";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "01ck1ankgr9ikvfghhdcs777yrl2j2p8cw9q8nfdrjp22lpchabl";
sha256 = "0cxcdyy974ya1yi7s14sw54rwpc8qjngxr0jqb8vxki3528phrv3";
};
postInstall = if isPy3k then "" else ''
echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py
echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py
'';
propagatedBuildInputs = [ azure-mgmt-common ];
pythonNamespaces = [ "azure.mgmt" ];
# has no tests
doCheck = false;
@ -30,6 +27,6 @@ buildPythonPackage rec {
description = "This is the Microsoft Azure Storage Management Client Library";
homepage = "https://github.com/Azure/azure-sdk-for-python";
license = licenses.mit;
maintainers = with maintainers; [ olcai mwilsoninsight ];
maintainers = with maintainers; [ jonringer olcai mwilsoninsight ];
};
}

View file

@ -16,11 +16,8 @@ buildPythonPackage rec {
propagatedBuildInputs = [ azure-common msrest msrestazure ];
# fix namespace issues
postInstall = ''
rm $out/${python.sitePackages}/azure/__init__.py
rm $out/${python.sitePackages}/azure/multiapi/__init__.py
'';
# fix namespace
pythonNamespaces = [ "azure.multiapi" ];
# no tests included
doCheck = false;