* [Buildroot] [PATCH] host python/python3: conditionally disable unicodedata
@ 2014-02-07 10:16 Thomas De Schampheleire
2014-02-07 10:28 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Thomas De Schampheleire @ 2014-02-07 10:16 UTC (permalink / raw)
To: buildroot
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)
Reported-by: Gernot Vormayr <gvormayr@gmail.com>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
package/python/python.mk | 2 +-
package/python3/python3.mk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/python/python.mk b/package/python/python.mk
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -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
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -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)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] host python/python3: conditionally disable unicodedata
2014-02-07 10:16 [Buildroot] [PATCH] host python/python3: conditionally disable unicodedata Thomas De Schampheleire
@ 2014-02-07 10:28 ` Thomas Petazzoni
2014-02-13 9:15 ` Thomas De Schampheleire
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2014-02-07 10:28 UTC (permalink / raw)
To: buildroot
Dear Thomas De Schampheleire,
On Fri, 07 Feb 2014 11:16:05 +0100, Thomas De Schampheleire wrote:
> 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)
>
> Reported-by: Gernot Vormayr <gvormayr@gmail.com>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] host python/python3: conditionally disable unicodedata
2014-02-07 10:28 ` Thomas Petazzoni
@ 2014-02-13 9:15 ` Thomas De Schampheleire
2014-02-13 9:30 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Thomas De Schampheleire @ 2014-02-13 9:15 UTC (permalink / raw)
To: buildroot
Hi Peter,
On Fri, Feb 7, 2014 at 11:28 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Thomas De Schampheleire,
>
> On Fri, 07 Feb 2014 11:16:05 +0100, Thomas De Schampheleire wrote:
>> 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)
>>
>> Reported-by: Gernot Vormayr <gvormayr@gmail.com>
>> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] host python/python3: conditionally disable unicodedata
2014-02-13 9:15 ` Thomas De Schampheleire
@ 2014-02-13 9:30 ` Thomas Petazzoni
2014-02-14 20:41 ` Thomas De Schampheleire
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 9:30 UTC (permalink / raw)
To: buildroot
Dear Thomas De Schampheleire,
On Thu, 13 Feb 2014 10:15:14 +0100, Thomas De Schampheleire wrote:
> >> 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 <gvormayr@gmail.com>
> >> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
> >
> > 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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] host python/python3: conditionally disable unicodedata
2014-02-13 9:30 ` Thomas Petazzoni
@ 2014-02-14 20:41 ` Thomas De Schampheleire
2014-02-18 22:10 ` Peter Korsgaard
0 siblings, 1 reply; 6+ messages in thread
From: Thomas De Schampheleire @ 2014-02-14 20:41 UTC (permalink / raw)
To: buildroot
On Thu, Feb 13, 2014 at 10:30 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Thomas De Schampheleire,
>
> On Thu, 13 Feb 2014 10:15:14 +0100, Thomas De Schampheleire wrote:
>
>> >> 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 <gvormayr@gmail.com>
>> >> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
>> >
>> > 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] host python/python3: conditionally disable unicodedata
2014-02-14 20:41 ` Thomas De Schampheleire
@ 2014-02-18 22:10 ` Peter Korsgaard
0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2014-02-18 22:10 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin@gmail.com> 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.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-18 22:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-07 10:16 [Buildroot] [PATCH] host python/python3: conditionally disable unicodedata Thomas De Schampheleire
2014-02-07 10:28 ` Thomas Petazzoni
2014-02-13 9:15 ` Thomas De Schampheleire
2014-02-13 9:30 ` Thomas Petazzoni
2014-02-14 20:41 ` Thomas De Schampheleire
2014-02-18 22:10 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox