New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #35793 (closed defect: fixed)

Opened 9 months ago

Last modified 7 weeks ago

webkit-gtk @1.8.2_2 +quartz +video "ImportError: No module named simplejson"

Reported by: sasoph@… Owned by: jeremyhu@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: devans@…, egall@…
Port: webkit-gtk

Description

10.5.8 PPC, Xcode 3.1.4

Traceback (most recent call last):
  File "./Source/WebCore/inspector/CodeGeneratorInspector.py", line 38, in <module>
    import simplejson as json
ImportError: No module named simplejson
make: *** [DerivedSources/WebCore/InspectorBackendDispatcher.cpp] Error 1

Attachments

main.log (87.5 KB) - added by sasoph@… 9 months ago.
main.2.log (87.5 KB) - added by sasoph@… 9 months ago.
Patch applied

Change History

Changed 9 months ago by sasoph@…

comment:1 Changed 9 months ago by ryandesign@…

  • Owner changed from macports-tickets@… to jeremyhu@…

comment:2 Changed 9 months ago by jeremyhu@…

It is using simplejson if json fails to import:

try:
    import json
except ImportError:
    import simplejson as json

...

perhaps we need to force it to use /usr/bin/python when building...

comment:3 Changed 9 months ago by jeremyhu@…

  • Status changed from new to assigned

Please try this patch:

Index: Portfile
===================================================================
--- Portfile	(revision 96967)
+++ Portfile	(working copy)
@@ -52,6 +52,10 @@
         quartz.patch \
         bison-2.6.patch
 
+# https://trac.macports.org/ticket/35793
+configure.env-append \
+        PYTHON=/usr/bin/python
+
 configure.args	\
         --with-gtk=2.0 \
         --disable-introspection \

comment:4 Changed 9 months ago by sasoph@…

The patch gives the very same error.

How do I incant the json/simplejson import code block?

Does "port select python" have any bearing on the error?

Available versions for python:
	none (active)
	python25-apple
	python27
$ ls -l $(which python)
lrwxr-xr-x  1 root  wheel  72 Jan 17  2009 /usr/bin/python -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python

Changed 9 months ago by sasoph@…

Patch applied

comment:5 Changed 9 months ago by jeremyhu@…

Ah, I see... it's an issue with Leopard's python not having json. We'll need to build with MacPorts' python on Leopard.

comment:6 Changed 9 months ago by jeremyhu@…

  • Status changed from assigned to closed
  • Resolution set to fixed

comment:7 Changed 7 weeks ago by egall@…

  • Cc egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.