2019-04-27 16:19:51 +02:00
|
|
|
{ buildPythonPackage, pythonAtLeast, pytest, requests, requests_oauthlib, six
|
2018-03-10 23:22:35 +01:00
|
|
|
, fetchFromGitHub, responses, stdenv
|
2017-08-31 21:01:15 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asana";
|
2019-04-27 16:19:51 +02:00
|
|
|
version = "0.8.2";
|
|
|
|
|
|
|
|
# upstream reportedly doesn't support 3.7 yet, blocked on
|
|
|
|
# https://bugs.python.org/issue34226
|
|
|
|
disabled = pythonAtLeast "3.7";
|
2017-08-31 21:01:15 +02:00
|
|
|
|
2018-03-10 23:22:35 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "asana";
|
|
|
|
repo = "python-asana";
|
|
|
|
rev = "v${version}";
|
2019-04-27 16:19:51 +02:00
|
|
|
sha256 = "113zwnrpim1pdw8dzid2wpp5gzr2zk26jjl4wrwhgj0xk1cw94yi";
|
2017-08-31 21:01:15 +02:00
|
|
|
};
|
|
|
|
|
2018-03-10 23:22:35 +01:00
|
|
|
checkInputs = [ pytest responses ];
|
2017-08-31 21:01:15 +02:00
|
|
|
propagatedBuildInputs = [ requests requests_oauthlib six ];
|
|
|
|
|
2018-08-06 22:24:24 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "requests_oauthlib >= 0.8.0, == 0.8.*" "requests_oauthlib>=0.8.0<2.0"
|
2017-08-31 21:01:15 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test tests
|
|
|
|
'';
|
|
|
|
|
2018-03-10 23:22:35 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Python client library for Asana";
|
|
|
|
homepage = https://github.com/asana/python-asana;
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
2017-08-31 21:01:15 +02:00
|
|
|
}
|