2018-07-21 01:44:44 +01:00
|
|
|
{ buildPythonPackage, pytest, requests, requests_oauthlib, six
|
2018-03-10 22:22:35 +00:00
|
|
|
, fetchFromGitHub, responses, stdenv
|
2017-08-31 20:01:15 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asana";
|
2018-08-06 21:24:24 +01:00
|
|
|
version = "0.7.1";
|
2017-08-31 20:01:15 +01:00
|
|
|
|
2018-03-10 22:22:35 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "asana";
|
|
|
|
repo = "python-asana";
|
|
|
|
rev = "v${version}";
|
2018-08-06 21:24:24 +01:00
|
|
|
sha256 = "0vmpy4j1n54gkkg0l8bhw0xf4yby5kqzxnsv07cjc2w38snj5vy1";
|
2017-08-31 20:01:15 +01:00
|
|
|
};
|
|
|
|
|
2018-03-10 22:22:35 +00:00
|
|
|
checkInputs = [ pytest responses ];
|
2017-08-31 20:01:15 +01:00
|
|
|
propagatedBuildInputs = [ requests requests_oauthlib six ];
|
|
|
|
|
2018-08-06 21:24:24 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "requests_oauthlib >= 0.8.0, == 0.8.*" "requests_oauthlib>=0.8.0<2.0"
|
2017-08-31 20:01:15 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test tests
|
|
|
|
'';
|
|
|
|
|
2018-03-10 22:22:35 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Python client library for Asana";
|
|
|
|
homepage = https://github.com/asana/python-asana;
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
2017-08-31 20:01:15 +01:00
|
|
|
}
|