host python/python3: conditionally disable unicodedata
PATCH 1/1 host python/python3: conditionally disable unicodedata
The host python always had --disable-unicodedata, regardless of the corresponding configuration option BR2_PACKAGE_PYTHON_UNICODEDATA. Since the host python is used to byte-compile python modules, this meant that such modules could not contain unicode strings. For example, following statement in a python module:
print u"\N{SOLIDUS}"
would cause the byte-compilation to fail with message:
SyntaxError: ("(unicode error) \\N escapes not supported (can't load unicodedata module)",
Instead, conditionally disable unicodedata based on BR2_PACKAGE_PYTHON_UNICODEDATA, also for the host python.
This fixes bug #6542 (https://bugs.busybox.net/show_bug.cgi?id=6542)
--- package/python/python.mk | 2 +- package/python3/python3.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
package/python/python.mk +1 -1
@@ -26,7 +26,6 @@ HOST_PYTHON_CONF_OPT += \ --disable-curses \ --disable-codecs-cjk \ --disable-nis \ - --disable-unicodedata \ --disable-dbm \ --disable-gdbm \ --disable-bsddb \
@@ -100,6 +99,7 @@ endif ifneq ($(BR2_PACKAGE_PYTHON_UNICODEDATA),y) PYTHON_CONF_OPT += --disable-unicodedata +HOST_PYTHON_CONF_OPT += --disable-unicodedata endif # Default is UCS2 w/o a conf opt
package/python3/python3.mk +1 -1
@@ -23,7 +23,6 @@ HOST_PYTHON3_CONF_OPT += \ --disable-curses \ --disable-codecs-cjk \ --disable-nis \ - --disable-unicodedata \ --disable-test-modules \ --disable-idle3
@@ -88,6 +87,7 @@ endif ifneq ($(BR2_PACKAGE_PYTHON3_UNICODEDATA),y) PYTHON3_CONF_OPT += --disable-unicodedata +HOST_PYTHON3_CONF_OPT += --disable-unicodedata endif ifeq ($(BR2_PACKAGE_PYTHON3_BZIP2),y)
PATCH 1/1 host python/python3: conditionally disable unicodedata
Dear Thomas De Schampheleire,
Quoted 11 lines · Thomas De Schampheleire
The host python always had --disable-unicodedata, regardless of the corresponding configuration option
BR2_PACKAGE_PYTHON_UNICODEDATA. Since the host python is used to byte-compile python modules, this meant that such modules could not contain unicode strings. For example, following statement in a python module:
print u"\N{SOLIDUS}"would cause the byte-compilation to fail with message:
SyntaxError: ("(unicode error) \\N escapes not supported (can't load unicodedata module)",
Quoted 7 lines
Instead, conditionally disable unicodedata based on
BR2_PACKAGE_PYTHON_UNICODEDATA, also for the host python.This fixes bug #6542 (https://bugs.busybox.net/show_bug.cgi?id=6542)
Reported-by Gernot Vormayr <[email protected]>Signed-off-by Thomas De Schampheleire <[email protected]>
For information, my upcoming patch series that bumps Python uses --enable-unicodedata unconditionally for the host python, because recent versions of python-setuptools need unicodedata.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 host python/python3: conditionally disable unicodedata
Hi Peter,
Quoted 17 lines · Thomas Petazzoni
Dear Thomas De Schampheleire,
Quoted 14 lines · Thomas De Schampheleire
The host python always had --disable-unicodedata, regardless of the corresponding configuration option
BR2_PACKAGE_PYTHON_UNICODEDATA. Since the host python is used to byte-compile python modules, this meant that such modules could not contain unicode strings. For example, following statement in a python module:
print u"\N{SOLIDUS}"would cause the byte-compilation to fail with message:
SyntaxError: ("(unicode error) \\N escapes not supported (can't load unicodedata module)",Instead, conditionally disable unicodedata based on
BR2_PACKAGE_PYTHON_UNICODEDATA, also for the host python.
Quoted 9 lines
Quoted 4 lines
This fixes bug #6542 (https://bugs.busybox.net/show_bug.cgi?id=6542)
Reported-by Gernot Vormayr <[email protected]>Signed-off-by Thomas De Schampheleire <[email protected]>For information, my upcoming patch series that bumps Python uses --enable-unicodedata unconditionally for the host python, because recent versions of python-setuptools need unicodedata.
I think this patch should still be part of 2014.02.
Best regards,
Thomas
PATCH 1/1 host python/python3: conditionally disable unicodedata
Dear Thomas De Schampheleire,
Quoted 12 lines · Thomas De Schampheleire
Quoted 12 lines
Quoted 11 lines
would cause the byte-compilation to fail with message:
SyntaxError: ("(unicode error) \\N escapes not supported (can't load unicodedata module)",Instead, conditionally disable unicodedata based on
BR2_PACKAGE_PYTHON_UNICODEDATA, also for the host python.This fixes bug #6542 (https://bugs.busybox.net/show_bug.cgi?id=6542)
Reported-by Gernot Vormayr <[email protected]>Signed-off-by Thomas De Schampheleire <[email protected]>
Quoted 6 lines
Quoted 4 lines
For information, my upcoming patch series that bumps Python uses --enable-unicodedata unconditionally for the host python, because recent versions of python-setuptools need unicodedata.
I think this patch should still be part of 2014.02.
I agree.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 host python/python3: conditionally disable unicodedata
Quoted 16 lines · Thomas Petazzoni
Dear Thomas De Schampheleire,
Quoted 12 lines · Thomas De Schampheleire
Quoted 12 lines
Quoted 11 lines
would cause the byte-compilation to fail with message:
SyntaxError: ("(unicode error) \\N escapes not supported (can't load unicodedata module)",Instead, conditionally disable unicodedata based on
BR2_PACKAGE_PYTHON_UNICODEDATA, also for the host python.This fixes bug #6542 (https://bugs.busybox.net/show_bug.cgi?id=6542)
Reported-by Gernot Vormayr <[email protected]>Signed-off-by Thomas De Schampheleire <[email protected]>
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
For information, my upcoming patch series that bumps Python uses --enable-unicodedata unconditionally for the host python, because recent versions of python-setuptools need unicodedata.
I think this patch should still be part of 2014.02.
I agree.
Peter, now that I have your attention, this one should be applied too :) (if you agree, of course)
Thanks,
Thomas
PATCH 1/1 host python/python3: conditionally disable unicodedata
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas De Schampheleire <[email protected]> writes:
I think this patch should still be part of 2014.02.
I agree.
Peter, now that I have your attention, this one should be applied too :) (if you agree, of course)
Ok ;)
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard