From 115609e035516913459aa589fcb708ee77dd431d Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Wed, 22 Aug 2007 12:16:36 +0000 Subject: Add to python path libxul_dir/python --- (limited to 'python') diff --git a/python/.gitignore b/python/.gitignore index 3f9c71f..e582563 100644 --- a/python/.gitignore +++ b/python/.gitignore @@ -1 +1,2 @@ +config.py.in hulahop.c diff --git a/python/Makefile.am b/python/Makefile.am index ad6041d..00fefe9 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -1,7 +1,8 @@ sugardir = $(pythondir)/hulahop sugar_PYTHON = \ __init__.py \ - webview.py + webview.py \ + config.py INCLUDES = \ $(DEPS_CFLAGS) \ @@ -23,8 +24,8 @@ _hulahop_la_SOURCES = \ hulahop.c: hulahop.defs hulahop.override -CLEANFILES = hulahop.c -EXTRA_DIST = hulahop.override hulahop.defs +CLEANFILES = hulahop.c config.py +EXTRA_DIST = hulahop.override hulahop.defs config.py.in .defs.c: (cd $(srcdir)\ diff --git a/python/__init__.py b/python/__init__.py index a30a891..49ce42a 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -16,9 +16,14 @@ # Boston, MA 02111-1307, USA. import os +import sys import gtk +from hulahop import config + +sys.path.insert(0, os.path.join(config.libxul_dir, 'python')) + from hulahop._hulahop import shutdown from hulahop import _hulahop diff --git a/python/config.py.in b/python/config.py.in new file mode 100644 index 0000000..f838575 --- /dev/null +++ b/python/config.py.in @@ -0,0 +1 @@ +libxul_dir = '@LIBXUL_DIR@' -- cgit v0.9.1