depot/third_party/nixpkgs/pkgs/development/python-modules/httpx/default.nix
Default email 07d6a74cbb Project import generated by Copybara.
GitOrigin-RevId: f5e8bdd07d1afaabf6b37afc5497b1e498b8046f
2021-03-19 18:17:44 +01:00

67 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, brotli
, certifi
, h2
, httpcore
, rfc3986
, sniffio
, pytestCheckHook
, pytest-asyncio
, pytest-trio
, pytestcov
, trustme
, uvicorn
}:
buildPythonPackage rec {
pname = "httpx";
version = "0.17.1";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "encode";
repo = pname;
rev = version;
sha256 = "sha256-P4Uki+vlAgVECBUz9UGvv1ip49jmf0kYbyU2/mkWE3U=";
};
propagatedBuildInputs = [
brotli
certifi
h2
httpcore
rfc3986
sniffio
];
checkInputs = [
pytestCheckHook
pytest-asyncio
pytest-trio
pytestcov
trustme
uvicorn
];
pythonImportsCheck = [ "httpx" ];
disabledTests = [
# httpcore.ConnectError: [Errno 101] Network is unreachable
"test_connect_timeout"
# httpcore.ConnectError: [Errno -2] Name or service not known
"test_async_proxy_close"
"test_sync_proxy_close"
];
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "The next generation HTTP client";
homepage = "https://github.com/encode/httpx";
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}