-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
RFC: Make "disable i18n" logic optional #899
Conversation
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.
based in the initial input i'm under the impression, that rather than using "C", a encoding name that allows for utf8 or a system encoding should be used
what are the values of the LC_*/LANG variables on your system, and whats the concrete encoding error you observe?
@@ -101,6 +101,10 @@ Callables or other Python objects have to be passed in `setup.py` (via the `use_ | |||
Setuptools will still normalize it to create the final distribution, | |||
so as to stay compliant with the python packaging standards. | |||
|
|||
`disable_i18n` |
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.
having it a config options is fundamentally wrong as everyone affected would have to enable it individually
The original error was:
I don't have any LC_ variables set in my own environment, but the output of
For the project I am building, there are non-ascii characters in both package and module names, so pretty much every path will have one or more of them. |
@RonnyPfannschmidt, following your suggestion I tried just changing This minimal change also solved my problem, so it would be a perfectly good solution for me. Do you think this change needs to be possible to opt out from (via e.g. environment variable), or could it be accepted as a one-liner? |
the one liner is much better than the option it would be nice to have a unit-test for this tho |
I think I can arrange that. :-) I'll drop this PR and make a new one in a bit. |
I've had issues with Mercurial refusing to run (OSError hg not found) when called by setuptools-scm. After some digging, it turns out that this is due to an ASCII-decode exception when Python loads site modules.
The run() function in _run_cmd.py overrides the LC_ALL environment variable, removing this override made hg/python happy enough to run again.
This pull request contains a first stab at making the LC_ALL override configurable. The changes are enough to solve the specific problem I am experiencing, but it is not complete. I would like to have your feedback on the general approach, before investing the time to roll out
disable_i18n
config to all of setuptools-scm.