pythonPackages.sh: fix tests on Python 3.7

This commit is contained in:
Ben Wolsieffer 2018-12-21 00:01:13 -05:00
parent 0aac84e1c3
commit 26fb110d81

View File

@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi, coverage }:
{ stdenv, buildPythonPackage, fetchPypi, python, coverage, lsof, glibcLocales }:
buildPythonPackage rec {
pname = "sh";
@ -9,10 +9,15 @@ buildPythonPackage rec {
sha256 = "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm";
};
checkInputs = [ coverage ];
postPatch = ''
sed -i 's#/usr/bin/env python#${python.interpreter}#' test.py
'';
checkInputs = [ coverage lsof glibcLocales ];
# A test needs the HOME directory to be different from $TMPDIR.
preCheck = ''
export LC_ALL="en_US.UTF-8"
HOME=$(mktemp -d)
'';