git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #138598 from mweinelt/python/priority
972780aMartin Weinelt
pkgs/development/python-modules/priority/deadline.patchdeleted−39
@@ -1,39 +0,0 @@
1−From 9d933c3c6535c1c63291e3d35f4ada9135d422df Mon Sep 17 00:00:00 2001
2−From: Alyssa Ross <hi@alyssa.is>
3−Date: Mon, 11 Mar 2019 02:08:43 +0000
4−Subject: [PATCH] Allow test_period_of_repetition to be slow
5−
6−Recent versions of hypothesis default to a 200ms timeout, which wasn't
7−enough for my Thinkpad X220 to run this test. I've increased the timeout
8−for this single test to hopefully a reasonable amount for older
9−hardware.
10−
11−(cherry picked from commit 752beb3a32b59f54168816da531c9d2a387f9715)
12−---
13− test/test_priority.py | 3 ++-
14− 1 file changed, 2 insertions(+), 1 deletion(-)
15−
16−diff --git a/test/test_priority.py b/test/test_priority.py
17−index c98a28d..013ce30 100644
18−--- a/test/test_priority.py
19−+++ b/test/test_priority.py
20−@@ -12,7 +12,7 @@ import itertools
21−
22− import pytest
23−
24−-from hypothesis import given
25−+from hypothesis import given, settings
26− from hypothesis.strategies import (
27− integers, lists, tuples, sampled_from
28− )
29−@@ -489,6 +489,7 @@ class TestPriorityTreeOutput(object):
30− fairness and equidistribution.
31− """
32− @given(STREAMS_AND_WEIGHTS)
33−+ @settings(deadline=None)
34− def test_period_of_repetition(self, streams_and_weights):
35− """
36− The period of repetition of a priority sequence is given by the sum of
37−--
38−2.19.2
39−
pkgs/development/python-modules/priority/default.nix+17−10
@@ -1,28 +1,35 @@
1+{ lib
1−{ lib, buildPythonPackage, fetchPypi, pytest, hypothesis }:
2+, buildPythonPackage
3+, pythonOlder
4+, fetchPypi
5+, hypothesis
6+, pytestCheckHook
7+}:
2
8
3buildPythonPackage rec {
9buildPythonPackage rec {
4 pname = "priority";
10 pname = "priority";
5 version = "2.0.0";
11 version = "2.0.0";
12+ format = "setuptools";
13+ disabled = pythonOlder "3.6.1";
6
14
7 src = fetchPypi {
15 src = fetchPypi {
8 inherit pname version;
16 inherit pname version;
9 sha256 = "c965d54f1b8d0d0b19479db3924c7c36cf672dbf2aec92d43fbdaf4492ba18c0";
17 sha256 = "c965d54f1b8d0d0b19479db3924c7c36cf672dbf2aec92d43fbdaf4492ba18c0";
10 };
18 };
11
19
12− patches = [
20+ pythonImportsCheck = [
13− # https://github.com/python-hyper/priority/pull/135
21+ "priority"
14− ./deadline.patch
15 ];
22 ];
16
23
17− checkInputs = [ pytest hypothesis ];
24+ checkInputs = [
18− checkPhase = ''
25+ hypothesis
19− PYTHONPATH="src:$PYTHONPATH" pytest
26+ pytestCheckHook
20− '';
27+ ];
21
28
22 meta = with lib; {
29 meta = with lib; {
23− homepage = "https://python-hyper.org/priority/";
24 description = "A pure-Python implementation of the HTTP/2 priority tree";
30 description = "A pure-Python implementation of the HTTP/2 priority tree";
31+ homepage = "https://github.com/python-hyper/priority/";
25 license = licenses.mit;
32 license = licenses.mit;
26− maintainers = [ maintainers.qyliss ];
33+ maintainers = with maintainers; [ qyliss ];
27 };
34 };
28}
35}