pythonPackages.azure-mgmt-storage: refactor move to python-modules

This commit is contained in:
Chris Ostrouchov 2018-10-10 12:29:12 -04:00 committed by Frederik Rietdijk
parent 1675213fac
commit 071053bcb0
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,37 @@
{ pkgs
, buildPythonPackage
, fetchPypi
, python
, azure-mgmt-common
}:
buildPythonPackage rec {
version = "0.20.0";
pname = "azure-mgmt-storage";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "16iw7hqhq97vlzfwixarfnirc60l5mz951p57brpcwyylphl3yim";
};
preConfigure = ''
# Patch to make this package work on requests >= 2.11.x
# CAN BE REMOVED ON NEXT PACKAGE UPDATE
sed -i 's|len(request_content)|str(len(request_content))|' azure/mgmt/storage/storagemanagement.py
'';
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
'';
propagatedBuildInputs = [ azure-mgmt-common ];
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 ];
};
}

View File

@ -230,6 +230,8 @@ in {
azure-mgmt-nspkg = callPackage ../development/python-modules/azure-mgmt-nspkg { }; azure-mgmt-nspkg = callPackage ../development/python-modules/azure-mgmt-nspkg { };
azure-mgmt-storage = callPackage ../development/python-modules/azure-mgmt-storage { };
backports_csv = callPackage ../development/python-modules/backports_csv {}; backports_csv = callPackage ../development/python-modules/backports_csv {};
backports-shutil-which = callPackage ../development/python-modules/backports-shutil-which {}; backports-shutil-which = callPackage ../development/python-modules/backports-shutil-which {};