1{ lib, buildPythonPackage, fetchPypi
2, nose, psutil, mock }:
3
4buildPythonPackage rec {
5 version = "2.0.2";
6 pname = "selectors2";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "1f1bbaac203a23fbc851dc1b5a6e92c50698cc8cefa5873eb5b89eef53d1d82b";
11 };
12
13 checkInputs = [ nose psutil mock ];
14
15 checkPhase = ''
16 # https://github.com/NixOS/nixpkgs/pull/46186#issuecomment-419450064
17 # Trick to disable certain tests that depend on timing which
18 # will always fail on hydra
19 export TRAVIS=""
20 nosetests tests/test_selectors2.py \
21 --exclude=test_above_fd_setsize
22 '';
23
24 meta = with lib; {
25 homepage = "https://www.github.com/SethMichaelLarson/selectors2";
26 description = "Back-ported, durable, and portable selectors";
27 license = licenses.mit;
28 maintainers = [ maintainers.costrouc ];
29 };
30}