python3Packages.uvicorn: 0.8.4 -> 0.9.0

This commit is contained in:
Jonathan Ringer 2019-09-16 15:07:28 -07:00
parent 9b092e228b
commit 80d1a3b37c
2 changed files with 16 additions and 21 deletions

View file

@ -1,23 +1,27 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, click
, h11
, httptools
, uvloop
, websockets
, wsproto
, pytest
, requests
, isPy27
}:
buildPythonPackage rec {
pname = "uvicorn";
version = "0.8.4";
version = "0.9.0";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "1l8rfm30inx9pma893i7sby9h7y910k58841zqaajksn563b882k";
src = fetchFromGitHub {
owner = "encode";
repo = pname;
rev = version;
sha256 = "0z4h04mbkzqgpk698bac6f50jxkf02ils6khzl7zbw7yvi6gkkc8";
};
propagatedBuildInputs = [
@ -29,11 +33,15 @@ buildPythonPackage rec {
wsproto
];
checkPhase = ''
$out/bin/uvicorn --help
postPatch = ''
substituteInPlace setup.py \
--replace "h11==0.8.*" "h11"
'';
patches = [ ./setup.patch ];
checkInputs = [ pytest requests ];
checkPhase = ''
pytest
'';
meta = with lib; {
homepage = https://www.uvicorn.org/;

View file

@ -1,13 +0,0 @@
diff --git a/setup.py b/setup.py
index 802cda4..561abf4 100755
--- a/setup.py
+++ b/setup.py
@@ -42,7 +42,7 @@ env_marker = (
requirements = [
"click==7.*",
- "h11==0.8.*",
+ "h11",
"websockets==7.*",
"httptools==0.0.13 ;" + env_marker,
"uvloop==0.12.* ;" + env_marker,