From 5d26b1b9c0f9e04103ef4193819b7c0b2ec7fe7f Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Wed, 10 Oct 2018 12:31:40 -0400 Subject: [PATCH] pythonPackages.azure-storage: refactor move to python-modules --- .../python-modules/azure-storage/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 21 ++--------- 2 files changed, 37 insertions(+), 19 deletions(-) create mode 100644 pkgs/development/python-modules/azure-storage/default.nix diff --git a/pkgs/development/python-modules/azure-storage/default.nix b/pkgs/development/python-modules/azure-storage/default.nix new file mode 100644 index 000000000000..6693a7464d43 --- /dev/null +++ b/pkgs/development/python-modules/azure-storage/default.nix @@ -0,0 +1,35 @@ +{ pkgs +, buildPythonPackage +, fetchPypi +, python +, azure-common +, futures +, dateutil +, requests +, isPy3k +}: + +buildPythonPackage rec { + version = "0.20.3"; + pname = "azure-storage"; + + src = fetchPypi { + inherit pname version; + extension = "zip"; + sha256 = "06bmw6k2000kln5jwk5r9bgcalqbyvqirmdh9gq4s6nb4fv3c0jb"; + }; + + propagatedBuildInputs = [ azure-common dateutil requests ] + ++ pkgs.lib.optionals (!isPy3k) [ futures ]; + + postInstall = '' + echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__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 4d773612f186..da8d303ead5c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -234,6 +234,8 @@ in { azure-mgmt-storage = callPackage ../development/python-modules/azure-mgmt-storage { }; + azure-storage = callPackage ../development/python-modules/azure-storage { }; + backports_csv = callPackage ../development/python-modules/backports_csv {}; backports-shutil-which = callPackage ../development/python-modules/backports-shutil-which {}; @@ -785,25 +787,6 @@ in { noise = callPackage ../development/python-modules/noise {}; - azure-storage = buildPythonPackage rec { - version = "0.20.3"; - name = "azure-storage-${version}"; - src = pkgs.fetchurl { - url = mirror://pypi/a/azure-storage/azure-storage-0.20.3.zip; - sha256 = "06bmw6k2000kln5jwk5r9bgcalqbyvqirmdh9gq4s6nb4fv3c0jb"; - }; - propagatedBuildInputs = with self; [ azure-common futures dateutil requests ]; - postInstall = '' - echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__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-servicemanagement-legacy = buildPythonPackage rec { version = "0.20.1"; name = "azure-servicemanagement-legacy-${version}";