depot/third_party/nixpkgs/pkgs/development/python-modules/httpx/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

70 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, certifi
, hstspreload
, chardet
, h11
, h2
, idna
, rfc3986
, sniffio
, isPy27
, pytest
, pytestcov
, trustme
, uvicorn
, trio
, brotli
, urllib3
}:
buildPythonPackage rec {
pname = "httpx";
version = "0.12.1";
disabled = isPy27;
src = fetchFromGitHub {
owner = "encode";
repo = pname;
rev = version;
sha256 = "1nrp4h1ppb5vll81fzxmks82p0hxcil9f3mja3dgya511kc703h6";
};
propagatedBuildInputs = [
certifi
hstspreload
chardet
h11
h2
idna
rfc3986
sniffio
urllib3
];
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 ];
};
}