From patchwork Mon Mar 4 20:52:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 224829 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 4B7FB2C0317 for ; Tue, 5 Mar 2013 07:52:57 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2D0DDA02DB; Mon, 4 Mar 2013 20:52:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D7FE4QQR3jcT; Mon, 4 Mar 2013 20:52:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B4C2CA02D3; Mon, 4 Mar 2013 20:52:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id EE2A18F75E for ; Mon, 4 Mar 2013 20:52:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2DC808D22D for ; Mon, 4 Mar 2013 20:52:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XhCRvncwijsM for ; Mon, 4 Mar 2013 20:52:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [94.23.35.102]) by whitealder.osuosl.org (Postfix) with ESMTP id 32E9C8D21D for ; Mon, 4 Mar 2013 20:52:45 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 69EAB82E; Mon, 4 Mar 2013 21:52:45 +0100 (CET) Received: from skate (humanoidz.org [82.247.183.72]) by mail.free-electrons.com (Postfix) with ESMTPSA id CC14580D; Mon, 4 Mar 2013 21:52:44 +0100 (CET) Date: Mon, 4 Mar 2013 21:52:40 +0100 From: Thomas Petazzoni To: Daniel Price Message-ID: <20130304215240.5316cea9@skate> In-Reply-To: <1362099940-25020-1-git-send-email-daniel.price@gmail.com> References: <1362099940-25020-1-git-send-email-daniel.price@gmail.com> Organization: Free Electrons X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Cc: buildroot@busybox.net Subject: Re: [Buildroot] [PATCH 1/2 V3] Add bzip2 to host-python when it is selected (aids in compiling nodejs) X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Dear Daniel Price, On Thu, 28 Feb 2013 17:05:40 -0800, Daniel Price wrote: > Based off of patches posted by (and Signed-off-by): Jonathan Liu > > Signed-off-by: Daniel Price If you add the attached patch to the nodejs package, then we no longer need the bz2 module in Python, at least not in the default nodejs build. Thomas Remove dependency on Python bz2 module The Python bz2 module is only needed in certain cases, so only import it when needed. In the normal nodejs build, this allows to remove the dependency on this module. Signed-off-by: Thomas Petazzoni Index: b/deps/v8/tools/js2c.py =================================================================== --- a/deps/v8/tools/js2c.py +++ b/deps/v8/tools/js2c.py @@ -33,7 +33,6 @@ import os, re, sys, string import jsmin -import bz2 def ToCAsciiArray(lines): @@ -344,6 +343,7 @@ 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)