New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python3.7-docutils: build fix on darwin #59758
python3.7-docutils: build fix on darwin #59758
Conversation
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
Notes Before:
Googling found this page:
|
I've since built the |
@GrahamcOfBorg build python27Packages.docutils python37Packages.docutils |
@@ -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 '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LANG is set by default now for python packages, I thought that had precedence over LC_*. Does this mean we should perhaps set both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, to be honest. All I know is what i put above: without LC_ALL
the build fails; with it set it succeeds. I just followed the instructions on the website linked above :)
Motivation for this change
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
Setting the other environment variable mentioned there (
LC_ALL
) sufficed to resolve the build failure.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)