aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/pyfxa/default.nix
blob: eb5403c2b968546c7d99dfbcc5aabc7250039a4f (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
{ lib, buildPythonPackage, fetchPypi
, requests, cryptography, pybrowserid, hawkauthlib, six
, grequests, mock, responses, pytest, pyjwt }:

buildPythonPackage rec {
  pname = "PyFxA";
  version = "0.7.7";

  src = fetchPypi {
    inherit pname version;
    sha256 = "6c85cd08cf05f7138dee1cf2a8a1d68fd428b7b5ad488917c70a2a763d651cdb";
  };

  postPatch = ''
    # Requires network access
    rm fxa/tests/test_core.py
  '';

  propagatedBuildInputs = [
    pyjwt requests cryptography pybrowserid hawkauthlib six
  ];

  checkInputs = [
    grequests mock responses pytest
  ];

  # test_oath is mostly network calls
  checkPhase = ''
    pytest --ignore=fxa/tests/test_oauth.py
  '';

  meta = with lib; {
    description = "Firefox Accounts client library for Python";
    homepage = "https://github.com/mozilla/PyFxA";
    license = licenses.mpl20;
  };
}