aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/asana/default.nix
blob: 71c003ef9b0a9f748223b7994c7dca66c553bddd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ buildPythonPackage, pythonAtLeast, pytest, requests, requests_oauthlib, six
, fetchFromGitHub, responses, stdenv
}:

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";

  src = fetchFromGitHub {
    owner = "asana";
    repo = "python-asana";
    rev = "v${version}";
    sha256 = "11nsfygcfpc2qb2gy4npi9w00cqfh88g7k3rsfq7xambz1zjdz1n";
  };

  checkInputs = [ pytest responses ];
  propagatedBuildInputs = [ requests requests_oauthlib six ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace "requests_oauthlib >= 0.8.0, == 0.8.*" "requests_oauthlib>=0.8.0<2.0"
  '';

  checkPhase = ''
    py.test tests
  '';

  meta = with stdenv.lib; {
    description = "Python client library for Asana";
    homepage = "https://github.com/asana/python-asana";
    license = licenses.mit;
  };
}