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

38 lines
953 B
Nix
Raw Normal View History

{ buildPythonPackage, pythonAtLeast, pytest, requests, requests_oauthlib, six
, fetchFromGitHub, responses, stdenv
2017-08-31 20:01:15 +01:00
}:
buildPythonPackage rec {
pname = "asana";
version = "0.10.3";
# 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
src = fetchFromGitHub {
owner = "asana";
repo = "python-asana";
rev = "v${version}";
sha256 = "11nsfygcfpc2qb2gy4npi9w00cqfh88g7k3rsfq7xambz1zjdz1n";
2017-08-31 20:01:15 +01:00
};
checkInputs = [ pytest responses ];
2017-08-31 20:01:15 +01:00
propagatedBuildInputs = [ requests requests_oauthlib six ];
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
'';
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
}