Skip to content

Commit

Permalink
Make azure-mgmt-resource work with requests 2.11.x. We should update …
Browse files Browse the repository at this point in the history
…the azure python packages, however, that is a much bigger effort. This is needed to make sure nixops keeps working with Azure.
  • Loading branch information
rbvermaa committed Feb 12, 2017
1 parent 0e0038f commit 81f2bde
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -1545,6 +1545,11 @@ in modules // {
url = mirror://pypi/a/azure-mgmt-resource/azure-mgmt-resource-0.20.1.zip;
sha256 = "0slh9qfm5nfacrdm3lid0sr8kwqzgxvrwf27laf9v38kylkfqvml";
};
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/resource/resourcemanagement.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
Expand Down

0 comments on commit 81f2bde

Please sign in to comment.