package/nodejs: security bump for 0.10.x to version 0.10.42
[buildroot-gz.git] / package / nodejs / 0.10.42 / 0001-remove-python-bz2-dependency.patch
blob75fe437502223dcd7998ad02d81d8f454e136d0b
1 Remove dependency on Python bz2 module
3 The Python bz2 module is only needed in certain cases, so only import
4 it when needed. In the normal nodejs build, this allows to remove the
5 dependency on this module.
7 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8 Index: b/deps/v8/tools/js2c.py
9 ===================================================================
10 --- a/deps/v8/tools/js2c.py
11 +++ b/deps/v8/tools/js2c.py
12 @@ -33,7 +33,6 @@
14 import os, re, sys, string
15 import jsmin
16 -import bz2
19 def ToCAsciiArray(lines):
20 @@ -344,6 +343,7 @@
21 else:
22 raw_sources_declaration = RAW_SOURCES_COMPRESSION_DECLARATION
23 if env['COMPRESSION'] == 'bz2':
24 + import bz2
25 all_sources = bz2.compress("".join(all_sources))
26 total_length = len(all_sources)
27 sources_data = ToCArray(all_sources)