0001-remove-python-bz2-dependency.patch 824 B

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