From patchwork Tue Aug 21 11:31:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Dawson X-Patchwork-Id: 179045 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 9FBC62C00AC for ; Tue, 21 Aug 2012 21:32:29 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 094611016C2; Tue, 21 Aug 2012 11:32:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7dNEokV3quFg; Tue, 21 Aug 2012 11:32:24 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 81B8310148E; Tue, 21 Aug 2012 11:32:24 +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 081238F753 for ; Tue, 21 Aug 2012 11:32:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id ED4368B43C for ; Tue, 21 Aug 2012 11:32:22 +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 BDeiL2a2gnTJ for ; Tue, 21 Aug 2012 11:32:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ee0-f43.google.com (mail-ee0-f43.google.com [74.125.83.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id 606098A9AD for ; Tue, 21 Aug 2012 11:32:21 +0000 (UTC) Received: by eekd4 with SMTP id d4so3308350eek.16 for ; Tue, 21 Aug 2012 04:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer; bh=6PNFseXhYb4FoqyKhCDmXJElrzg4DYOEBdy2T1lzoQc=; b=LEM92h7+ncqKcS5/mopu/uG+YUkYcmKPDW0YD4pg1U6fgBkRzVgSfWRgHvdDxAC6Nr Kh58adwzHC549OQnkZwVwLC0dwcliuL8Qj0lEsNSHcv4JLda3IoIf3dem/GlC46fMrAy RZ5WIjvzYZdK1GULAma8iE/CbjUwuoe3FTV4/VyS6rYEG1qe3EJ1MDXhzJBnPPdzq1ah 7zL3gaTg6varEb/PPQIcX6RGrvUsLteG1BmBp3X4huQjybThNlwyC30QNQCHJPuxxocJ h1tEsEzCbfarL0KSYjViUzgeruB1V/e4k2l/EEvq4SW2Iro+JR/QgMiosM0k648fbEud K4Bg== Received: by 10.14.172.193 with SMTP id t41mr13006853eel.25.1345548719399; Tue, 21 Aug 2012 04:31:59 -0700 (PDT) Received: from percy.train.local ([213.170.149.177]) by mx.google.com with ESMTPS id m45sm3547127eep.16.2012.08.21.04.31.57 (version=SSLv3 cipher=OTHER); Tue, 21 Aug 2012 04:31:58 -0700 (PDT) From: spdawson@gmail.com To: buildroot@busybox.net Date: Tue, 21 Aug 2012 12:31:55 +0100 Message-Id: <1345548715-16593-1-git-send-email-spdawson@gmail.com> X-Mailer: git-send-email 1.7.9.5 Subject: [Buildroot] [PATCH] gpsd: fix Python-related build failure 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Simon Dawson The gpsd build falls over on certain autobuild machines; an example follows. http://autobuild.buildroot.net/results/42b435c271b0d791365e18ad974c7eecca8896a0/build-end.log ImportError: No module named simplejson: File "/scratch/peko/build/gpsd-3.7/SConstruct", line 1072: from leapsecond import save_leapseconds File "/scratch/peko/build/gpsd-3.7/leapsecond.py", line 27: import gps.misc File "/scratch/peko/build/gpsd-3.7/gps/__init__.py", line 9: from gps import * File "/scratch/peko/build/gpsd-3.7/gps/gps.py", line 17: from client import * File "/scratch/peko/build/gpsd-3.7/gps/client.py", line 9: import simplejson as json # For Python 2.4 and 2.5 make: *** [/scratch/peko/build/gpsd-3.7/.stamp_built] Error 2 The problem appears to be the indiscriminate importing done in the module initialisation for the gps Python module. If the simplejson module is not available for the host Python, then the build fails. For the purposes of the build, the simplejson import is superfluous; in fact, since SConstruct pulls in gps.misc via leapsecond.py, all of the imports in the gps module initialisation are superfluous. Signed-off-by: Simon Dawson --- .../gpsd-05-python-2.5-compat-simplejson.patch | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/gpsd/gpsd-05-python-2.5-compat-simplejson.patch diff --git a/package/gpsd/gpsd-05-python-2.5-compat-simplejson.patch b/package/gpsd/gpsd-05-python-2.5-compat-simplejson.patch new file mode 100644 index 0000000..f275faa --- /dev/null +++ b/package/gpsd/gpsd-05-python-2.5-compat-simplejson.patch @@ -0,0 +1,40 @@ +The gpsd build falls over on certain autobuild machines; an example follows. + + http://autobuild.buildroot.net/results/42b435c271b0d791365e18ad974c7eecca8896a0/build-end.log + +ImportError: No module named simplejson: + File "/scratch/peko/build/gpsd-3.7/SConstruct", line 1072: + from leapsecond import save_leapseconds + File "/scratch/peko/build/gpsd-3.7/leapsecond.py", line 27: + import gps.misc + File "/scratch/peko/build/gpsd-3.7/gps/__init__.py", line 9: + from gps import * + File "/scratch/peko/build/gpsd-3.7/gps/gps.py", line 17: + from client import * + File "/scratch/peko/build/gpsd-3.7/gps/client.py", line 9: + import simplejson as json # For Python 2.4 and 2.5 +make: *** [/scratch/peko/build/gpsd-3.7/.stamp_built] Error 2 + +The problem appears to be the indiscriminate importing done in the module +initialisation for the gps Python module. If the simplejson module is not +available for the host Python, then the build fails. + +For the purposes of the build, the simplejson import is superfluous; in fact, +since SConstruct pulls in gps.misc via leapsecond.py, all of the imports in +the gps module initialisation are superfluous. + +Signed-off-by: Simon Dawson +diff -Nurp a/gps/__init__.py b/gps/__init__.py +--- a/gps/__init__.py 2012-05-23 22:06:40.000000000 +0100 ++++ b/gps/__init__.py 2012-08-03 09:09:54.096816764 +0100 +@@ -6,8 +6,8 @@ + api_major_version = 5 # bumped on incompatible changes + api_minor_version = 0 # bumped on compatible changes + +-from gps import * +-from misc import * ++#from gps import * ++#from misc import * + + # The 'client' module exposes some C utility functions for Python clients. + # The 'packet' module exposes the packet getter via a Python interface.