nixpkgs/pkgs/development/python-modules/httpx/default.nix

68 lines
1.2 KiB
Nix
Raw Normal View History

2019-12-29 18:05:45 +00:00
{ lib
, buildPythonPackage
, pythonOlder
2019-12-29 18:05:45 +00:00
, fetchFromGitHub
, brotli
2019-12-29 18:05:45 +00:00
, certifi
, h2
, httpcore
2019-12-29 18:05:45 +00:00
, rfc3986
, sniffio
, pytestCheckHook
, pytest-asyncio
, pytest-trio
2019-12-29 18:05:45 +00:00
, pytestcov
, trustme
, uvicorn
}:
buildPythonPackage rec {
pname = "httpx";
version = "0.17.0";
disabled = pythonOlder "3.6";
2019-12-29 18:05:45 +00:00
src = fetchFromGitHub {
owner = "encode";
repo = pname;
rev = version;
sha256 = "sha256-pRdhPAxKZOVbRhOm4881Dn+IRtpX5T3oFuYdtWp3cgY=";
2019-12-29 18:05:45 +00:00
};
propagatedBuildInputs = [
brotli
2019-12-29 18:05:45 +00:00
certifi
h2
httpcore
2019-12-29 18:05:45 +00:00
rfc3986
sniffio
];
checkInputs = [
pytestCheckHook
pytest-asyncio
pytest-trio
2019-12-29 18:05:45 +00:00
pytestcov
trustme
uvicorn
];
pythonImportsCheck = [ "httpx" ];
2019-12-29 18:05:45 +00:00
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;
2019-12-29 18:05:45 +00:00
meta = with lib; {
description = "The next generation HTTP client";
homepage = "https://github.com/encode/httpx";
2019-12-29 18:05:45 +00:00
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}