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

38 lines
859 B
Nix
Raw Normal View History

2018-08-07 09:36:23 +01:00
{ lib, buildPythonPackage, fetchPypi
, requests, cryptography, pybrowserid, hawkauthlib, six
, grequests, mock, responses, pytest, pyjwt }:
2018-08-07 09:36:23 +01:00
buildPythonPackage rec {
pname = "PyFxA";
2020-07-31 09:56:44 +01:00
version = "0.7.7";
2018-08-07 09:36:23 +01:00
src = fetchPypi {
inherit pname version;
2020-07-31 09:56:44 +01:00
sha256 = "6c85cd08cf05f7138dee1cf2a8a1d68fd428b7b5ad488917c70a2a763d651cdb";
2018-08-07 09:36:23 +01:00
};
postPatch = ''
# Requires network access
rm fxa/tests/test_core.py
'';
propagatedBuildInputs = [
pyjwt requests cryptography pybrowserid hawkauthlib six
2018-08-07 09:36:23 +01:00
];
checkInputs = [
2019-12-02 18:59:52 +00:00
grequests mock responses pytest
2018-08-07 09:36:23 +01:00
];
# test_oath is mostly network calls
2019-12-02 18:59:52 +00:00
checkPhase = ''
pytest --ignore=fxa/tests/test_oauth.py
2019-12-02 18:59:52 +00:00
'';
2018-08-07 09:36:23 +01:00
meta = with lib; {
description = "Firefox Accounts client library for Python";
homepage = "https://github.com/mozilla/PyFxA";
2018-08-07 09:36:23 +01:00
license = licenses.mpl20;
};
}