2020-10-28 20:43:51 +01:00
|
|
|
{ lib
|
2020-08-27 23:36:12 +02:00
|
|
|
, buildPythonPackage
|
2020-10-28 20:43:51 +01:00
|
|
|
, pythonOlder
|
2020-08-27 23:36:12 +02:00
|
|
|
, fetchFromGitHub
|
|
|
|
, h11
|
2020-10-28 20:43:51 +01:00
|
|
|
, h2
|
|
|
|
, pproxy
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytestcov
|
2020-08-27 23:36:12 +02:00
|
|
|
, sniffio
|
2020-10-28 20:43:51 +01:00
|
|
|
, uvicorn
|
2020-08-27 23:36:12 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "httpcore";
|
2020-10-28 20:43:51 +01:00
|
|
|
version = "0.12.0";
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-08-27 23:36:12 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "encode";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-10-28 20:43:51 +01:00
|
|
|
sha256 = "0bwxn7m7r7h6k41swxj0jqj3nzi76wqxwbnry6y7d4qfh4m26g2j";
|
2020-08-27 23:36:12 +02:00
|
|
|
};
|
|
|
|
|
2020-10-28 20:43:51 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
h11
|
|
|
|
h2
|
|
|
|
sniffio
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pproxy
|
|
|
|
pytestCheckHook
|
|
|
|
pytestcov
|
|
|
|
uvicorn
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
# these tests fail during dns lookups: httpcore.ConnectError: [Errno -2] Name or service not known
|
|
|
|
"--ignore=tests/sync_tests/test_interfaces.py"
|
|
|
|
];
|
2020-08-27 23:36:12 +02:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "httpcore" ];
|
|
|
|
|
2020-10-28 20:43:51 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A minimal low-level HTTP client";
|
2020-08-27 23:36:12 +02:00
|
|
|
homepage = "https://github.com/encode/httpcore";
|
|
|
|
license = licenses.bsd3;
|
2020-10-28 20:43:51 +01:00
|
|
|
maintainers = with maintainers; [ ris ];
|
2020-08-27 23:36:12 +02:00
|
|
|
};
|
|
|
|
}
|