python3.7-docutils: build fix on darwin

Fix python docutils package for OSX.  On a relatively clean new macbook,
with latest OS Mojave 10.14.3, this package failed to build.  A bit of
searching led to:
https://coderwall.com/p/-k_93g/mac-os-x-valueerror-unknown-locale-utf-8-in-python
This commit is contained in:
Dave Nicponski 2019-04-17 00:31:56 -04:00 committed by Frederik Rietdijk
parent 9d87ccabce
commit a6a88bffd5

View File

@ -17,7 +17,7 @@ buildPythonPackage rec {
# 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 ''
checkPhase = lib.optionalString (isPy3k && stdenv.isDarwin) ''LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" '' + (if isPy3k then ''
${python.interpreter} test3/alltests.py
'' else ''
${python.interpreter} test/alltests.py