0001-Remove-dependency-on-Python-bz2-module.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From 3d4817c152d6f3afddcc699949c4d1664da91e2b Mon Sep 17 00:00:00 2001
  2. From: Martin Bark <martin@barkynet.com>
  3. Date: Tue, 30 Jun 2015 09:43:11 +0100
  4. Subject: [PATCH 1/4] Remove dependency on Python bz2 module
  5. The Python bz2 module is only needed in certain cases, so only import
  6. it when needed. In the normal nodejs build, this allows to remove the
  7. dependency on this module.
  8. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  9. [Martin: adapt to 0.12.5]
  10. Signed-off-by: Martin Bark <martin@barkynet.com>
  11. ---
  12. deps/v8/tools/js2c.py | 2 +-
  13. 1 file changed, 1 insertion(+), 1 deletion(-)
  14. diff --git a/deps/v8/tools/js2c.py b/deps/v8/tools/js2c.py
  15. index 77485f6..371caf5 100755
  16. --- a/deps/v8/tools/js2c.py
  17. +++ b/deps/v8/tools/js2c.py
  18. @@ -34,7 +34,6 @@
  19. import os, re, sys, string
  20. import optparse
  21. import jsmin
  22. -import bz2
  23. import textwrap
  24. @@ -492,6 +491,7 @@ def CompressMaybe(sources, compression_type):
  25. if compression_type == "off":
  26. return sources_bytes
  27. elif compression_type == "bz2":
  28. + import bz2
  29. return bz2.compress(sources_bytes)
  30. else:
  31. raise Error("Unknown compression type %s." % compression_type)
  32. --
  33. 2.1.4