2017-05-07 11:55:45 +01:00
|
|
|
{ lib, buildPythonPackage, fetchurl, requests, novaclient, keyring,
|
2017-03-09 09:52:37 +00:00
|
|
|
rackspace-novaclient, six, isPy3k, pytest, glibcLocales }:
|
2017-03-09 09:22:20 +00:00
|
|
|
buildPythonPackage rec {
|
2017-05-27 10:25:35 +01:00
|
|
|
pname = "pyrax";
|
|
|
|
version = "1.9.8";
|
|
|
|
name = "${pname}-${version}";
|
2017-03-09 09:22:20 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://pypi/p/pyrax/${name}.tar.gz";
|
|
|
|
sha256 = "1x98jzyxnvha81pgx3jpfixljhs7zik89yfp8q06kwpx8ws99nz9";
|
|
|
|
};
|
|
|
|
|
|
|
|
# no good reason given in commit why limited, and seems to work
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace "setup.py" \
|
|
|
|
--replace "python-novaclient==2.27.0" "python-novaclient"
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabled = isPy3k;
|
2017-05-07 11:55:45 +01:00
|
|
|
propagatedBuildInputs = [ requests novaclient keyring rackspace-novaclient six ];
|
2017-03-09 09:22:20 +00:00
|
|
|
|
2017-03-09 09:52:37 +00:00
|
|
|
LC_ALL = "en_US.UTF-8";
|
|
|
|
buildInputs = [ pytest glibcLocales ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test tests/unit
|
|
|
|
'';
|
|
|
|
|
2017-03-09 09:22:20 +00:00
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/rackspace/pyrax";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
description = "Python API to interface with Rackspace";
|
|
|
|
maintainers = with lib.maintainers; [ teh ];
|
|
|
|
};
|
|
|
|
}
|