2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy27
|
|
|
|
, mock
|
|
|
|
, pycrypto
|
|
|
|
, requests
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest-runner
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest
|
|
|
|
, requests-mock
|
|
|
|
, typing
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "apache-libcloud";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "3.3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "d7450453eaf5904eb4fb4f74cf9f37dc83721a719bce34f5abb336b1a1ab974d";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
checkInputs = [ mock pytest pytest-runner requests-mock ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ pycrypto requests ] ++ lib.optionals isPy27 [ typing ];
|
|
|
|
|
|
|
|
preConfigure = "cp libcloud/test/secrets.py-dist libcloud/test/secrets.py";
|
|
|
|
|
|
|
|
# requires a certificates file
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
pythonImportsCheck = [ "libcloud" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A unified interface to many cloud providers";
|
2021-02-05 17:12:51 +00:00
|
|
|
homepage = "https://libcloud.apache.org/";
|
|
|
|
changelog = "https://github.com/apache/libcloud/blob/v${version}/CHANGES.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|