2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2022-01-13 20:06:32 +00:00
|
|
|
, betamax
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-01-13 20:06:32 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
|
|
|
, mock
|
|
|
|
, pyopenssl
|
2022-01-13 20:06:32 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, requests
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requests-toolbelt";
|
|
|
|
version = "0.9.1";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-01-13 20:06:32 +00:00
|
|
|
hash = "sha256-loCJ1FhK1K18FxRU8KXG2sI5celHJSHqO21J1hCqb8A=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
betamax
|
|
|
|
mock
|
|
|
|
pyopenssl
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# Fix collections.abc deprecation warning, https://github.com/requests/toolbelt/pull/246
|
|
|
|
name = "fix-collections-abc-deprecation.patch";
|
|
|
|
url = "https://github.com/requests/toolbelt/commit/7188b06330e5260be20bce8cbcf0d5ae44e34eaf.patch";
|
|
|
|
sha256 = "sha256-pRkG77sNglG/KsRX6JaPgk4QxmmSBXypFRp/vNA3ot4=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/requests/toolbelt/issues/306
|
|
|
|
"test_no_content_length_header"
|
|
|
|
"test_read_file"
|
|
|
|
"test_reads_file_from_url_wrapper"
|
|
|
|
"test_x509_der"
|
|
|
|
"test_x509_pem"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"requests_toolbelt"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Toolbelt of useful classes and functions to be used with requests";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://toolbelt.rtfd.org";
|
2022-01-13 20:06:32 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ matthiasbeyer ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|