Merge pull request #68723 from jonringer/freeze-azure-storage

nixops_1_6_1: fix build
This commit is contained in:
Maximilian Bosch 2019-09-15 20:03:13 +02:00 committed by GitHub
commit 3ddbe41f79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 3 deletions

View File

@ -1,8 +1,9 @@
{ pkgs
{ lib
, buildPythonPackage
, fetchPypi
, azure-nspkg
, isPyPy
, setuptools
, python
, isPy3k
}:
@ -20,7 +21,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [
azure-nspkg
];
] ++ lib.optionals (!isPy3k) [ setuptools ]; # need for namespace lookup
postInstall = if isPy3k then "" else ''
echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py
@ -28,7 +29,7 @@ buildPythonPackage rec {
doCheck = false;
meta = with pkgs.lib; {
meta = with lib; {
description = "This is the Microsoft Azure common code";
homepage = https://github.com/Azure/azure-sdk-for-python/tree/master/azure-common;
license = licenses.mit;

View File

@ -28,6 +28,7 @@ buildPythonPackage rec {
postInstall = if isPy3k then "" else ''
echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py
echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py
'';
doCheck = false;

View File

@ -0,0 +1,35 @@
{ pkgs
, buildPythonPackage
, fetchPypi
, python
, azure-common
, futures
, dateutil
, requests
, isPy3k
}:
buildPythonPackage rec {
version = "0.20.3";
pname = "azure-storage";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "06bmw6k2000kln5jwk5r9bgcalqbyvqirmdh9gq4s6nb4fv3c0jb";
};
propagatedBuildInputs = [ azure-common dateutil requests ]
++ pkgs.lib.optionals (!isPy3k) [ futures ];
postInstall = ''
echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py
'';
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

@ -26,6 +26,7 @@ callPackage ./generic.nix (rec {
azure-mgmt-nspkg = callPackage ./azure-mgmt-nspkg { };
azure-mgmt-resource = callPackage ./azure-mgmt-resource { };
azure-mgmt-storage = callPackage ./azure-mgmt-storage { };
azure-storage = callPackage ./azure-storage { };
});
};
})