2019-04-27 15:19:51 +01:00
|
|
|
{ buildPythonPackage, pythonAtLeast, pytest, requests, requests_oauthlib, six
|
2021-01-25 08:26:54 +00:00
|
|
|
, fetchFromGitHub, responses, lib
|
2017-08-31 20:01:15 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asana";
|
2020-11-19 15:59:37 +00:00
|
|
|
version = "0.10.3";
|
2019-04-27 15:19:51 +01:00
|
|
|
|
|
|
|
# upstream reportedly doesn't support 3.7 yet, blocked on
|
|
|
|
# https://bugs.python.org/issue34226
|
|
|
|
disabled = pythonAtLeast "3.7";
|
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}";
|
2020-11-19 15:59:37 +00:00
|
|
|
sha256 = "11nsfygcfpc2qb2gy4npi9w00cqfh88g7k3rsfq7xambz1zjdz1n";
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-03-10 22:22:35 +00:00
|
|
|
description = "Python client library for Asana";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/asana/python-asana";
|
2018-03-10 22:22:35 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
2017-08-31 20:01:15 +01:00
|
|
|
}
|