summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/httpx
diff options
context:
space:
mode:
authorChris Ostrouchov <chris.ostrouchov@gmail.com>2019-12-29 13:05:45 -0500
committerChris Ostrouchov <chris.ostrouchov@gmail.com>2019-12-29 13:05:45 -0500
commit5a673d3c05a79940dea48662ebea2ac4b39fa432 (patch)
treef3a3a770605fdfa21a483569a7f3b15b0c49c0d1 /pkgs/development/python-modules/httpx
parentpython3Packages.databases: init at 0.2.6 (diff)
downloadnixpkgs-5a673d3c05a79940dea48662ebea2ac4b39fa432.tar.gz
python3Packages.httpx: init at 0.9.5
Diffstat (limited to 'pkgs/development/python-modules/httpx')
-rw-r--r--pkgs/development/python-modules/httpx/default.nix68
1 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/httpx/default.nix b/pkgs/development/python-modules/httpx/default.nix
new file mode 100644
index 000000000000..04a0592d7506
--- /dev/null
+++ b/pkgs/development/python-modules/httpx/default.nix
@@ -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 ];
+ };
+}