Make azure-mgmt-... work with requests 2.11.x. We should update the azure python packages, however, that is a much bigger effort. This is needed to make sure nixops keeps working with Azure.
(cherry picked from commit 4eb92c5c64906a5142e7cb34bdcfc7e16ab77dd1)
This commit is contained in:
parent
c07f1589bf
commit
a74d1594f1
1 changed files with 15 additions and 0 deletions
|
@ -1706,6 +1706,11 @@ in {
|
|||
url = mirror://pypi/a/azure-mgmt-compute/azure-mgmt-compute-0.20.0.zip;
|
||||
sha256 = "12hr5vxdg2sk2fzr608a37f4i8nbchca7dgdmly2w5fc7x88jx2v";
|
||||
};
|
||||
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/compute/computemanagement.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
|
||||
|
@ -1726,6 +1731,11 @@ in {
|
|||
url = mirror://pypi/a/azure-mgmt-network/azure-mgmt-network-0.20.1.zip;
|
||||
sha256 = "10vj22h6nxpw0qpvib5x2g6qs5j8z31142icvh4qk8k40fcrs9hx";
|
||||
};
|
||||
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/network/networkresourceprovider.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
|
||||
|
@ -1787,6 +1797,11 @@ in {
|
|||
url = mirror://pypi/a/azure-mgmt-storage/azure-mgmt-storage-0.20.0.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
|
||||
|
|
Loading…
Reference in a new issue