build: python3 support for configure#30047
Closed
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Discovered while messing with some infra switching things around to
python3. On Linux, if you callconfiguredirectly with apython3(not letting it findpythonfor you) and haveLC_ALL=Cset, as we do in some of our infra, apparentlyopen()defaults to ascii. This is a problem for icu version detection because there's a©at the top of deps/icu-small/source/common/unicode/uvernum.h which it reads to find major version number.This change fixes it and makes it work for Python 2 & 3. Although I don't really know what I'm doing with the conversion back to ascii for later compatibility so someone who knows better should check.