diff --git a/pkgs/development/python-modules/azure-mgmt-common/default.nix b/pkgs/development/python-modules/azure-mgmt-common/default.nix new file mode 100644 index 000000000000..5ba49d1f3f1f --- /dev/null +++ b/pkgs/development/python-modules/azure-mgmt-common/default.nix @@ -0,0 +1,33 @@ +{ pkgs +, buildPythonPackage +, fetchPypi +, python +, azure-common +, azure-mgmt-nspkg +, requests +}: + +buildPythonPackage rec { + version = "0.20.0"; + pname = "azure-mgmt-common"; + + src = fetchPypi { + inherit pname version; + extension = "zip"; + sha256 = "1rmzpz3733wv31rsnqpdy4bbafvk5dhbqx7q0xf62dlz7p0i4f66"; + }; + + propagatedBuildInputs = [ azure-common azure-mgmt-nspkg requests ]; + + postInstall = '' + 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 + ''; + + meta = with pkgs.lib; { + description = "Microsoft Azure SDK for Python"; + homepage = "https://azure.microsoft.com/en-us/develop/python/"; + license = licenses.asl20; + maintainers = with maintainers; [ olcai ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b779ab8a25e1..4801ac847300 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -220,6 +220,8 @@ in { azure-common = callPackage ../development/python-modules/azure-common { }; + azure-mgmt-common = callPackage ../development/python-modules/azure-mgmt-common { }; + backports_csv = callPackage ../development/python-modules/backports_csv {}; backports-shutil-which = callPackage ../development/python-modules/backports-shutil-which {}; @@ -787,26 +789,6 @@ in { }; }; - azure-mgmt-common = buildPythonPackage rec { - version = "0.20.0"; - name = "azure-mgmt-common-${version}"; - src = pkgs.fetchurl { - url = mirror://pypi/a/azure-mgmt-common/azure-mgmt-common-0.20.0.zip; - sha256 = "1rmzpz3733wv31rsnqpdy4bbafvk5dhbqx7q0xf62dlz7p0i4f66"; - }; - propagatedBuildInputs = with self; [ azure-common azure-mgmt-nspkg requests ]; - postInstall = '' - 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 - ''; - meta = { - description = "Microsoft Azure SDK for Python"; - homepage = "https://azure.microsoft.com/en-us/develop/python/"; - license = licenses.asl20; - maintainers = with maintainers; [ olcai ]; - }; - }; - azure-mgmt-compute = buildPythonPackage rec { version = "0.20.0"; name = "azure-mgmt-compute-${version}";