git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.pytest-timeout: refactor add python 2.7 compatibiliy

In version 1.3.1 of `pytest-timeout` (latest) the setup.py file is not compatible with python 2.7 and 3+ due to how `open` is called. A patch has been added that can be removed once a fix and new relase is given.

commit7e192a55e7f1da45830bda0911128cad5e3f7804 authorChris Ostrouchov <chris.ostrouchov@gmail.com> dateWed 8 Aug 2018, 15:23 (8 years ago) parent5e21b90
1 file changed+12−1
pkgs/development/python-modules/pytest-timeout/default.nix+12−1
pkgs/development/python-modules/pytest-timeout/default.nix+12−1
@@ -1,5 +1,6 @@
11{ buildPythonPackage
22, fetchPypi
3+, fetchpatch
34, lib
45, pexpect
56, pytest
@@ -9,10 +10,20 @@ buildPythonPackage rec {
910 pname = "pytest-timeout";
1011 version = "1.3.1";
1112
13+ # remove after version 1.3.1
14+ patches = [
15+ (fetchpatch {
16+ name = "fix-installation-27-3-with-encoding-issue.patch";
17+ url = "https://bitbucket.org/pytest-dev/pytest-timeout/commits/9de81d3fc57a71a36d418d4aa181c241a7c5350f/raw";
18+ sha256 = "0g081j6iyc9825f63ssmmi40rkcgk4p9vvhy9g0lqd0gc6xzwa2p";
19+ })
20+ ];
21+
1222 src = fetchPypi {
1323 inherit pname version;
1424 sha256 = "4b261bec5782b603c98b4bb803484bc96bf1cdcb5480dae0999d21c7e0423a23";
1525 };
26+
1627 buildInputs = [ pytest ];
1728 checkInputs = [ pytest pexpect ];
1829 checkPhase = ''pytest -ra'';
@@ -21,6 +32,6 @@ buildPythonPackage rec {
2132 description = "py.test plugin to abort hanging tests";
2233 homepage = https://bitbucket.org/pytest-dev/pytest-timeout/;
2334 license = licenses.mit;
24− maintainers = with maintainers; [ makefu ];
35+ maintainers = with maintainers; [ makefu costrouc ];
2536 };
2637}