Skip to content

Commit

Permalink
pythonPackage.azure-mgmt-*: fix builds
Browse files Browse the repository at this point in the history
see #52547
  • Loading branch information
bendlas committed Dec 19, 2018
1 parent 5a64d8e commit 690728f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
, azure-common
, azure-mgmt-nspkg
, requests
, msrestazure
}:

buildPythonPackage rec {
Expand All @@ -17,7 +18,7 @@ buildPythonPackage rec {
sha256 = "1rmzpz3733wv31rsnqpdy4bbafvk5dhbqx7q0xf62dlz7p0i4f66";
};

propagatedBuildInputs = [ azure-common azure-mgmt-nspkg requests ];
propagatedBuildInputs = [ azure-common azure-mgmt-nspkg requests msrestazure ];

postInstall = ''
echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ buildPythonPackage rec {
sha256 = "5b0c2390af3e29d910e3d6e7a72b0be59d6e15933740dd193129217c000e4fed";
};

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ buildPythonPackage rec {
sha256 = "2e83289369be88d0f06792118db5a7d4ed7150f956aaae64c528808da5518d7f";
};

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 690728f

Please sign in to comment.