1{ lib
2, buildPythonPackage
3, fetchPypi
4, isPy3k
5, isPyPy
6, bash
7, python
8}:
9
10buildPythonPackage rec {
11 pname = "subprocess32";
12 version = "3.2.7";
13 name = "${pname}-${version}";
14 disabled = isPy3k;
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "1e450a4a4c53bf197ad6402c564b9f7a53539385918ef8f12bdf430a61036590";
19 };
20
21 buildInputs = [ bash ];
22
23 preConfigure = ''
24 substituteInPlace test_subprocess32.py \
25 --replace '/usr/' '${bash}/'
26 '';
27
28 doCheck = !isPyPy;
29 checkPhase = ''
30 ${python.interpreter} test_subprocess32.py
31 '';
32
33 meta = {
34 homepage = https://pypi.python.org/pypi/subprocess32;
35 description = "Backport of the subprocess module from Python 3.2.5 for use on 2.x";
36 maintainers = with lib.maintainers; [ garbas ];
37 };
38}