python3Packages.priority: fix build, refactor package

This commit is contained in:
Martin Weinelt
2021-09-23 23:22:51 +02:00
parent f19e1cf5d9
commit f4db405910
2 changed files with 17 additions and 49 deletions
@@ -1,28 +1,35 @@
{ lib, buildPythonPackage, fetchPypi, pytest, hypothesis }:
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, hypothesis
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "priority";
version = "2.0.0";
format = "setuptools";
disabled = pythonOlder "3.6.1";
src = fetchPypi {
inherit pname version;
sha256 = "c965d54f1b8d0d0b19479db3924c7c36cf672dbf2aec92d43fbdaf4492ba18c0";
};
patches = [
# https://github.com/python-hyper/priority/pull/135
./deadline.patch
pythonImportsCheck = [
"priority"
];
checkInputs = [ pytest hypothesis ];
checkPhase = ''
PYTHONPATH="src:$PYTHONPATH" pytest
'';
checkInputs = [
hypothesis
pytestCheckHook
];
meta = with lib; {
homepage = "https://python-hyper.org/priority/";
description = "A pure-Python implementation of the HTTP/2 priority tree";
homepage = "https://github.com/python-hyper/priority/";
license = licenses.mit;
maintainers = [ maintainers.qyliss ];
maintainers = with maintainers; [ qyliss ];
};
}