summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Dahlin <zilch@src.gnome.org>2003-01-21 23:59:16 +0000
committerJohan Dahlin <zilch@src.gnome.org>2003-01-21 23:59:16 +0000
commitb4dad8b9d2222cd045bf74f19cb57507e3e696d9 (patch)
tree41fc16256476d151514702d4d5c26805676ae2de
parent7b73aff9be3bf7462b09f79908db23c6d5b71267 (diff)
downloadpygtk-b4dad8b9d2222cd045bf74f19cb57507e3e696d9.tar.gz
Import codegen here instead, needs to be fixed in the future though.
* dsextras.py (Template.generate): Import codegen here instead, needs to be fixed in the future though. * Makefile.am (EXTRA_DIST): Added dsextras.py
-rw-r--r--ChangeLog5
-rw-r--r--Makefile.am1
-rw-r--r--dsextras.py18
3 files changed, 20 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 42cb2ab3..0d86a06e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2003-01-21 Johan Dahlin <jdahlin@async.com.br>
+ * dsextras.py (Template.generate): Import codegen here instead,
+ needs to be fixed in the future though.
+
+ * Makefile.am (EXTRA_DIST): Added dsextras.py
+
* gobjectmodule.c: Add GMainContext bindings and complete the
GMainLoop bindings. Fixes #102362.
diff --git a/Makefile.am b/Makefile.am
index 30694421..260a11fb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -97,6 +97,7 @@ EXTRA_DIST += \
config.h.win32 \
makefile.msc \
setup.py \
+ dsextras.py \
MANIFEST.in \
examples/atk/atk-demo.py \
examples/gobject/signal.py \
diff --git a/dsextras.py b/dsextras.py
index 9e7e9a2c..4ef3e9ee 100644
--- a/dsextras.py
+++ b/dsextras.py
@@ -1,3 +1,9 @@
+#
+# dsextras.py - Extra classes and utilities
+#
+# TODO:
+# Make it possible to import codegen from another dir
+#
from commands import getoutput, getstatusoutput
from distutils.command.build_ext import build_ext
from distutils.command.install_lib import install_lib
@@ -7,10 +13,6 @@ import os
import string
import sys
-from codegen.override import Overrides
-from codegen.defsparser import DefsParser
-from codegen.codegen import register_types, write_source, FileOutput
-
GLOBAL_INC = []
GLOBAL_MACROS = []
@@ -140,6 +142,14 @@ class Template:
return 0
def generate(self):
+ # We must insert it first, otherwise python will try '.' first,
+ # in which it exist a "bogus" codegen (the third import line
+ # here will fail)
+ sys.path.insert(0, 'codegen')
+ from override import Overrides
+ from defsparser import DefsParser
+ from codegen import register_types, write_source, FileOutput
+
if self.check_dates():
return