Message ID | 1363084639-9610-1-git-send-email-arnout@mind.be |
---|---|
State | Superseded |
Headers | show |
Dear Arnout Vandecappelle (Essensium/Mind), On Tue, 12 Mar 2013 11:37:19 +0100, Arnout Vandecappelle (Essensium/Mind) wrote: > From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> > > The Python bz2 module is only needed in certain cases, so only import > it when needed. In the normal qt5jsbackend build, this allows to remove > the dependency on this module. > > Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Hum, thanks but my Qt5 branch already has a similar patch: http://git.free-electrons.com/users/thomas-petazzoni/buildroot/commit/?h=qt5&id=7c841620816f18bb4547bc905aa3255c7cb967b5 Or did I miss something? Thanks, Thomas
On 03/12/13 13:36, Thomas Petazzoni wrote: > Dear Arnout Vandecappelle (Essensium/Mind), > > On Tue, 12 Mar 2013 11:37:19 +0100, Arnout Vandecappelle > (Essensium/Mind) wrote: >> From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> >> >> The Python bz2 module is only needed in certain cases, so only import >> it when needed. In the normal qt5jsbackend build, this allows to remove >> the dependency on this module. >> >> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> >> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > > Hum, thanks but my Qt5 branch already has a similar patch: > http://git.free-electrons.com/users/thomas-petazzoni/buildroot/commit/?h=qt5&id=7c841620816f18bb4547bc905aa3255c7cb967b5 Yeah, sorry, since you hadn't pushed I was still working against the older version of your patch - and I didn't actually look at the mail I was replying to :-) Regards, Arnout
diff --git a/package/qt5/qt5jsbackend/qt5jsbackend-0001-v8-js2c.py-Remove-dependency-on-bz2-module.patch b/package/qt5/qt5jsbackend/qt5jsbackend-0001-v8-js2c.py-Remove-dependency-on-bz2-module.patch new file mode 100644 index 0000000..17ceda1 --- /dev/null +++ b/package/qt5/qt5jsbackend/qt5jsbackend-0001-v8-js2c.py-Remove-dependency-on-bz2-module.patch @@ -0,0 +1,38 @@ +From 51d6d005eb383908a4d7031c61cef14cc4cbdc38 Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> +Date: Tue, 12 Mar 2013 08:07:09 +0100 +Subject: [PATCH] v8: js2c.py: Remove dependency on bz2 module + +The Python bz2 module is only needed in certain cases, so only import +it when needed. In the normal qtjsbackend build, this allows to remove the +dependency on this module. + +[arnout@mind.be: ported patch from nodejs] + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> +--- + src/3rdparty/v8/tools/js2c.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/3rdparty/v8/tools/js2c.py b/src/3rdparty/v8/tools/js2c.py +index d06cbe4..c63a640 100644 +--- a/src/3rdparty/v8/tools/js2c.py ++++ b/src/3rdparty/v8/tools/js2c.py +@@ -33,7 +33,6 @@ + + import os, re, sys, string + import jsmin +-import bz2 + + + def ToCAsciiArray(lines): +@@ -344,6 +343,7 @@ def JS2C(source, target, env): + else: + raw_sources_declaration = RAW_SOURCES_COMPRESSION_DECLARATION + if env['COMPRESSION'] == 'bz2': ++ import bz2 + all_sources = bz2.compress("".join(all_sources)) + total_length = len(all_sources) + sources_data = ToCArray(all_sources) +--