Merge pull request #51311 from FRidh/docutils

python.pkgs.docutils: set LANG in case of darwin and python3
This commit is contained in:
Daiderd Jordan 2018-12-02 19:24:51 +01:00 committed by GitHub
commit 0e6e8c1305
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,5 @@
{ lib
{ stdenv
, lib
, fetchurl
, buildPythonPackage
, isPy3k
@ -14,11 +15,13 @@ buildPythonPackage rec {
sha256 = "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji";
};
checkPhase = if isPy3k then ''
# Only Darwin needs LANG, but we could set it in general.
# It's done here conditionally to prevent mass-rebuilds.
checkPhase = lib.optionalString (isPy3k && stdenv.isDarwin) ''LANG="en_US.UTF-8" '' + (if isPy3k then ''
${python.interpreter} test3/alltests.py
'' else ''
${python.interpreter} test/alltests.py
'';
'');
# Create symlinks lacking a ".py" suffix, many programs depend on these names
postFixup = ''