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