python: Fix float byte order detection 11175/head
authorJeffery To <jeffery.to@gmail.com>
Thu, 30 Jan 2020 10:28:49 +0000 (18:28 +0800)
committerJeffery To <jeffery.to@gmail.com>
Thu, 30 Jan 2020 10:28:49 +0000 (18:28 +0800)
commita0da5aec7f4ae24feb3c4f2fb3bf3c1c9cb9e639
treebdc1b2e235416a284f5f5b704c6f72d7781b05d4
parentab3ba9ff2bf0768096c7a31742f108e71e533b86
python: Fix float byte order detection

This backports patches from bpo-34585[1] to fix byte order detection of
floats.

Fixing byte order detection allows the repr() of floats to be shorter (a
feature backported to Python 2.7 from Python 3.1[2]).
sys.float_repr_style should be 'short' instead of 'legacy' on supported
platforms.

See #11134.

[1]: https://bugs.python.org/issue34585
[2]: https://docs.python.org/2.7/whatsnew/2.7.html#python-3-1-features

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
lang/python/python/Makefile
lang/python/python/patches/026-bpo-34585-Dont-do-runtime-test-to-get-float-byte-order-GH-9085.patch [new file with mode: 0644]
lang/python/python/patches/027-bpo-34585-run-autoconf-GH-9411-edited.patch [new file with mode: 0644]