2017-09-26 18:31:57 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, requests
|
|
|
|
, betamax
|
|
|
|
, mock
|
|
|
|
, pytest
|
2019-06-23 00:27:59 +01:00
|
|
|
, pyopenssl
|
2017-09-26 18:31:57 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requests-toolbelt";
|
2019-02-14 07:37:29 +00:00
|
|
|
version = "0.9.1";
|
2017-09-26 18:31:57 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-02-14 07:37:29 +00:00
|
|
|
sha256 = "968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0";
|
2017-09-26 18:31:57 +01:00
|
|
|
};
|
|
|
|
|
2019-06-23 00:27:59 +01:00
|
|
|
checkInputs = [ pyopenssl betamax mock pytest ];
|
2017-09-26 18:31:57 +01:00
|
|
|
propagatedBuildInputs = [ requests ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
2019-02-14 13:08:13 +00:00
|
|
|
# disabled tests access the network
|
|
|
|
py.test tests -k "not test_no_content_length_header \
|
|
|
|
and not test_read_file \
|
|
|
|
and not test_reads_file_from_url_wrapper"
|
2017-09-26 18:31:57 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A toolbelt of useful classes and functions to be used with python-requests";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://toolbelt.rtfd.org";
|
2019-02-14 13:09:55 +00:00
|
|
|
license = lib.licenses.asl20;
|
2019-03-12 22:45:33 +00:00
|
|
|
maintainers = with lib.maintainers; [ matthiasbeyer ];
|
2017-09-26 18:31:57 +01:00
|
|
|
};
|
2019-03-12 22:45:33 +00:00
|
|
|
}
|