python3Packages.httpx: init at 0.9.5

This commit is contained in:
Chris Ostrouchov 2019-12-29 13:05:45 -05:00
parent f45eef8ff7
commit 5a673d3c05
No known key found for this signature in database
GPG Key ID: 9ED59B0AB1EAF573
2 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,68 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, certifi
, hstspreload
, chardet
, h11
, h2
, idna
, rfc3986
, sniffio
, isPy27
, pytest
, pytestcov
, trustme
, uvicorn
, trio
, brotli
}:
buildPythonPackage rec {
pname = "httpx";
version = "0.9.5";
disabled = isPy27;
src = fetchFromGitHub {
owner = "encode";
repo = pname;
rev = version;
sha256 = "140z2j7b5hlcxvfb433hqv5b8irqa88hpq33lzr9m992djbhj2hb";
};
propagatedBuildInputs = [
certifi
hstspreload
chardet
h11
h2
idna
rfc3986
sniffio
];
checkInputs = [
pytest
pytestcov
trustme
uvicorn
trio
brotli
];
postPatch = ''
substituteInPlace setup.py \
--replace "h11==0.8.*" "h11"
'';
checkPhase = ''
PYTHONPATH=.:$PYTHONPATH pytest
'';
meta = with lib; {
description = "The next generation HTTP client";
homepage = https://github.com/encode/httpx;
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}

View File

@ -2620,6 +2620,8 @@ in {
httpauth = callPackage ../development/python-modules/httpauth { };
httpx = callPackage ../development/python-modules/httpx { };
idna-ssl = callPackage ../development/python-modules/idna-ssl { };
identify = callPackage ../development/python-modules/identify { };