1{ lib
2, buildPythonPackage
3, fetchPypi
4, msrestazure
5, azure-common
6, azure-mgmt-nspkg
7, python
8, isPy3k
9}:
10
11buildPythonPackage rec {
12 pname = "azure-mgmt-billing";
13 version = "0.2.0"; #pypi's 0.2.0 doesn't build ootb
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "1li2bcdwdapwwx7xbvgfsq51f2mrwm0qyzih8cjhszcah2rkpxw5";
18 extension = "zip";
19 };
20
21 propagatedBuildInputs = [
22 msrestazure
23 azure-common
24 azure-mgmt-nspkg
25 ];
26
27 preBuild = ''
28 rm azure_bdist_wheel.py
29 substituteInPlace setup.cfg \
30 --replace "azure-namespace-package = azure-mgmt-nspkg" ""
31 '';
32
33 postInstall = lib.optionalString isPy3k ''
34 rm $out/${python.sitePackages}/azure/__init__.py
35 rm $out/${python.sitePackages}/azure/mgmt/__init__.py
36 '';
37
38 # has no tests
39 doCheck = false;
40
41 meta = with lib; {
42 description = "This is the Microsoft Azure Billing Client Library";
43 homepage = "https://github.com/Azure/azure-sdk-for-python";
44 license = licenses.mit;
45 maintainers = with maintainers; [ mwilsoninsight ];
46 };
47}