nixpkgs/pkgs/development/python-modules/asana/default.nix

38 lines
850 B
Nix
Raw Normal View History

2017-08-31 21:01:15 +02:00
{ lib, buildPythonPackage, fetchPypi,
pytest, requests, requests_oauthlib, six
}:
buildPythonPackage rec {
pname = "asana";
2018-01-20 11:57:10 +01:00
version = "0.6.7";
2017-08-31 21:01:15 +02:00
name = "${pname}-${version}";
meta = {
description = "Python client library for Asana";
homepage = https://github.com/asana/python-asana;
license = lib.licenses.mit;
};
src = fetchPypi {
inherit pname version;
2018-01-20 11:57:10 +01:00
sha256 = "d576601116764050c4cf63b417f1c24700b76cf6686f0e51e6b0b77d450e7973";
2017-08-31 21:01:15 +02:00
};
2017-10-25 20:04:35 +02:00
checkInputs = [ pytest ];
2017-08-31 21:01:15 +02:00
propagatedBuildInputs = [ requests requests_oauthlib six ];
patchPhase = ''
echo > requirements.txt
sed -i "s/requests~=2.9.1/requests >=2.9.1/" setup.py
sed -i "s/requests_oauthlib~=0.6.1/requests_oauthlib >=0.6.1/" setup.py
'';
# ERROR: file not found: tests
doCheck = false;
checkPhase = ''
py.test tests
'';
}