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