List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:October 27 2007 9:27am
Subject:Rev 209: Reworked python build to get the MySQL build info directly from automake. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjm...
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge

------------------------------------------------------------
revno: 209
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: ndbjmerge
timestamp: Sat 2007-10-27 02:26:42 -0700
message:
  Reworked python build to get the MySQL build info directly from automake.
removed:
  python/setup.cfg.in           
svn-v2:1@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-python%2fsetup.cfg
  python/setup.py.in            
svn-v2:1@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-python%2fsetup.py
added:
  python/setup.py                setup.py-20071027082659-u3uu8u83f54jtbn4-1
renamed:
  python/NdbObject => python/mysql/cluster/NdbObject
svn-v2:1@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-NdbObject
modified:
  configure.in                   configure.in-20070228020914-u2pk759xg7thauwf-13
  python/Makefile.am             makefile.am-20070925115907-x2wrdte5kicyfrrw-1
  python/ez_setup.py            
svn-v2:1@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-python%2fez_setup.py
  python/mgmapi.i               
svn-v2:10@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-python%2fmgm.i
  python/ndbapi.i               
svn-v2:1@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-python%2fndb.i
  python/testjoin.py             testjoin.py-20070922151423-72pjxm8rkhsdp80c-1
=== removed file 'python/setup.cfg.in'
--- a/python/setup.cfg.in	2007-05-01 22:50:04 +0000
+++ b/python/setup.cfg.in	1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
-[egg_info]
-tag_build = 
-tag_date = 0
-tag_svn_revision = 0
-
-[build_ext]
-# There is current a bug in distutils that makes us set this here and not in 
-# setup.py - which is a problem, because that's where we figure these out
-swig_opts = -c++ -O -DDOXYGEN_SHOULD_SKIP_INTERNAL -DMYSQL_@MYSQL_MAJOR_VERSION@
@MYSQL_INCLUDES@ -I../swig -outdir mysql/cluster
-

=== removed file 'python/setup.py.in'
--- a/python/setup.py.in	2007-09-25 11:59:24 +0000
+++ b/python/setup.py.in	1970-01-01 00:00:00 +0000
@@ -1,132 +0,0 @@
-#!/usr/bin/env python
-##  ndb-connectors: Wrappers for the NDBAPI
-##    Copyright (C) 2006 MySQL, Inc.
-##    
-##    This program is free software; you can redistribute it and/or modify
-##    it under the terms of the GNU General Public License as published by
-##    the Free Software Foundation; either version 2 of the License, or 
-##    (at your option) any later version.
-##    
-##    This program is distributed in the hope that it will be useful,
-##    but WITHOUT ANY WARRANTY; without even the implied warranty of
-##    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-##    GNU General Public License for more details.
-##
-##    You should have received a copy of the GNU General Public License
-##    along with this program; if not, write to the Free Software
-##    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-# bootstrap setuptools if necessary
-from ez_setup import use_setuptools
-use_setuptools()
-
-from distutils.command.clean import clean
-from setuptools import setup,Extension
-import os.path
-import sys
-
-def mysql_config(what):
-    from os import popen
-    f = popen("@MYSQL_CONFIG@ --%s" % what)
-    data = f.read().strip().split()
-    if f.close(): data = []
-    return data
-
-def dequote(s):
-    if s[0] in "\"'" and s[0] == s[-1]:
-        s = s[1:-1]
-    return s
-
-def ndb_expand(s):
-    return "%s %s/storage/ndb %s/storage/ndb/ndbapi %s/storage/ndb/mgmapi" % (s,s,s,s)
-
-libs = mysql_config("libs_r")
-client = "mysqlclient_r"
-if not libs:
-    libs = mysql_config("libs")
-    client = "mysqlclient"
-
-library_dirs = [ dequote(i[2:]) for i in libs if i.startswith("-L") ]
-libraries = [ dequote(i[2:]) for i in libs if i.startswith("-l") ]
-
-removable_compile_args = '-I -L -l'.split()
-extra_compile_args = [ i for i in mysql_config("cflags")
-                       if i[:2] not in removable_compile_args ]
-#extra_compile_args.append("-DDOXYGEN_SHOULD_SKIP_INTERNAL")
-extra_compile_args.append("-g")
-include_dirs = [ ndb_expand(dequote(i[2:]))
-                 for i in mysql_config('include')
-                 if i.startswith('-I') ]
-include_dirs = include_dirs[0].split(" ")
-libraries.append("ndbclient")
-libraries.append("mysys")
-#libraries.append("mysqld")
-libraries.append("mystrings")
-
-description = """Python wrapper of the NDBAPI"""
-
-classifiers="""\
-Development Status :: 2 - Pre-Alpha
-License :: OSI Approved :: GPL
-Operating System :: POSIX :: Linux
-Programming Language :: C++
-Programming Language :: Python
-Topic :: Software Development :: Libraries :: Python Modules
-"""
-
-version = "@PACKAGE_VERSION@"
-
-setup(name="python-ndbapi",
-      version=version,
-      description=description, 
-      long_description=description,
-      author="Monty Taylor",
-      author_email="mtaylor@stripped",
-      url="http://launchpad.net/ndb-connectors",
-      platforms="linux",
-      license="GPL",
-      classifiers=filter(None, classifiers.splitlines()),
-
-      ext_modules=[
-                    Extension("mysql.cluster._mgmapi",
-                              sources=["mgmapi.i"],
-                              ##libraries =
["mysqlclient_r","mystrings","mysys","z","crypt","nsl","m","pthread"],
-                              ##include_dirs =
[".","/usr/include/mysql","/usr/include/mysql/ndb/ndbapi","/usr/include/mysql/ndb"],
-                             
#extra_objects=["/usr/local/mysql/lib/mysql/libndbclient.a",
"/usr/local/mysql/lib/mysql/libmystrings.a", "/usr/local/mysql/lib/mysql/libmysys.a"],
-                              # FIXME - need to get just the MGMAPI ones
-                              depends=["../swig/%s" % f for f in os.listdir("../swig")],
-                              ##library_dirs=["/usr/lib/mysql"],
-                              libraries = libraries, 
-                              include_dirs = include_dirs, 
-                              library_dirs = library_dirs,
-                              extra_compile_args = extra_compile_args, 
-                             
-                              ),
-                    Extension("mysql.cluster._ndbapi",
-                              sources=["ndbapi.i"],
-                              ##libraries =
["mysqlclient_r","mystrings","mysys","z","crypt","nsl","m","pthread"],
-                              ##include_dirs =
[".","/usr/include/mysql","/usr/include/mysql/ndb/ndbapi","/usr/include/mysql/ndb"],
-                              #extra_objects=["/usr/lib/mysql/libmystrings.a",
"/usr/lib/mysql/libmysys.a", "/usr/lib/libndbclient.a", "/usr/lib/libmysqlclient_r.a"],
-                             
#extra_objects=["/usr/local/mysql/lib/mysql/libndbclient.a"],
-                              depends=["swig/%s" % f for f in os.listdir("../swig")],
-			     
#Ndb.i","../swig/globals.i","../swig/Ndb_cluster_connection.i","../swig/NdbTransaction.i"
,"../swig/NdbOperation.i", "../swig/NdbScanOperation.i", "../swig/NdbRecAttr.i", 
"../swig/NdbError.i"],
-                              ##library_dirs=["/usr/lib/mysql"],
-                              libraries = libraries, 
-                              include_dirs = include_dirs, 
-                              library_dirs = library_dirs,
-                              extra_compile_args = extra_compile_args, 
-                              swig_opts =
["-c++","-I/usr/include/mysql/storage/ndb/ndbapi","-I/usr/include/mysql/storage/ndb","-I/usr/include/mysql/storage/ndb/mgmapi"],
-                              language="c++",
-                             
-                              )
-
-                    ],
-      test_suite = "mysql.cluster.tests.NdbTest.test_all",
-      entry_points = {
-        'sqlalchemy.databases': [ 'ndbapi = mysql.cluster.alchemy:dialect' ]
-      },
-      py_modules=["mysql.cluster.ndbapi","mysql.cluster.mgmapi","mysql.cluster.alchemy"]
-      
-     )
-

=== added file 'python/setup.py'
--- a/python/setup.py	1970-01-01 00:00:00 +0000
+++ b/python/setup.py	2007-10-27 09:26:42 +0000
@@ -0,0 +1,76 @@
+#!/usr/bin/env python
+##  ndb-connectors: Wrappers for the NDBAPI
+##    Copyright (C) 2006 MySQL, Inc.
+##    
+##    This program is free software; you can redistribute it and/or modify
+##    it under the terms of the GNU General Public License as published by
+##    the Free Software Foundation; either version 2 of the License, or 
+##    (at your option) any later version.
+##    
+##    This program is distributed in the hope that it will be useful,
+##    but WITHOUT ANY WARRANTY; without even the implied warranty of
+##    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+##    GNU General Public License for more details.
+##
+##    You should have received a copy of the GNU General Public License
+##    along with this program; if not, write to the Free Software
+##    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+
+# bootstrap setuptools if necessary
+from ez_setup import use_setuptools
+use_setuptools()
+
+from distutils.command.clean import clean
+from setuptools import setup,Extension
+import os.path
+import sys
+
+description = """Python wrapper of the NDBAPI"""
+
+classifiers="""\
+Development Status :: 2 - Pre-Alpha
+License :: OSI Approved :: GPL
+Operating System :: POSIX :: Linux
+Programming Language :: C++
+Programming Language :: Python
+Topic :: Software Development :: Libraries :: Python Modules
+"""
+
+version = "0.5.0"
+
+setup(name="python-ndbapi",
+      version=version,
+      description=description, 
+      long_description=description,
+      author="Monty Taylor",
+      author_email="mtaylor@stripped",
+      url="http://launchpad.net/ndb-connectors",
+      platforms="linux",
+      license="GPL",
+      classifiers=filter(None, classifiers.splitlines()),
+
+      ext_modules=[
+                    Extension("mysql.cluster._mgmapi",
+                              sources=["mgmapi.cpp"],
+                              # FIXME - need to get just the MGMAPI ones
+                              depends=["../swig/%s" % f for f in os.listdir("../swig")],
+                              language="c++",
+                             
+                              ),
+                    Extension("mysql.cluster._ndbapi",
+                              sources=["ndbapi.cpp"],
+                              depends=["../swig/%s" % f for f in os.listdir("../swig")],
+                              language="c++",
+                             
+                              )
+
+                    ],
+      test_suite = "mysql.cluster.tests.NdbTest.test_all",
+      entry_points = {
+        'sqlalchemy.databases': [ 'ndbapi = mysql.cluster.alchemy:dialect' ]
+      },
+      py_modules=["mysql.cluster.ndbapi","mysql.cluster.mgmapi","mysql.cluster.alchemy"]
+      
+     )
+

=== renamed directory 'python/NdbObject' => 'python/mysql/cluster/NdbObject'
=== modified file 'configure.in'
--- a/configure.in	2007-10-26 23:59:50 +0000
+++ b/configure.in	2007-10-27 09:26:42 +0000
@@ -34,10 +34,19 @@
   AC_MSG_ERROR([Couldn't find swig.])
 fi
 
+SWIG_ENABLE_CXX
 
 AC_CHECK_PROGS(MONO,mono)
 AC_CHECK_PROGS(MCS,gmcs)
-SWIG_ENABLE_CXX
+
+AM_PATH_PYTHON([2.4],,[with_python="no"])
+if test "x$with_python" != "xno" ; then 
+  SWIG_PYTHON
+echo "pythonexists = $pythonexists"
+  if test "$pythonexists" = "no" ; then 
+    with_python="no"
+  fi
+fi
 AC_CANONICAL_HOST
 ACX_PTHREAD()
 
@@ -78,9 +87,6 @@
 fi
 
 
-# TODO: check for Python.h
-# Check for setuptools
-AM_PATH_PYTHON()
 
 WITH_PERL()
 
@@ -131,8 +137,6 @@
 AC_SUBST(PYTHON)
 AC_OUTPUT(Makefile \
 perl/Makefile \
-python/setup.cfg \
-python/setup.py \
 java/Makefile \
 python/Makefile \
 csharp/Makefile \

=== modified file 'python/Makefile.am'
--- a/python/Makefile.am	2007-10-11 08:35:50 +0000
+++ b/python/Makefile.am	2007-10-27 09:26:42 +0000
@@ -1,30 +1,28 @@
-
 # -*- Mode: Makefile -*-
-
 pythonarchdir=$(PYTHON_DIR)
 pythonarch_DATA=mysql/cluster/_ndbapi.so mysql/cluster/_mgmapi.so
 
-CLEANFILES=ndbapi_wrap.cpp mgmapi_wrap.cpp mysql/cluster/ndbapi.py
mysql/cluster/mgmapi.py mysql/cluster/*.so *pyc
+CLEANFILES=ndbapi.cpp ndbapi.h mgmapi.cpp mysql/cluster/ndbapi.py mysql/cluster/mgmapi.py
*.so mysql/cluster/*pyc *pyc
 
 SWIG_OPTS=-I$(srcdir) -I$(SWIG_DIR) @MYSQL_INCLUDES@ -outdir mysql/cluster
 
-#%_wrap.cpp: %.i $(SWIG_SOURCES)
-#	$(SWIG) -c++ -python $(SWIG_OPTS) -o $@ $<
-
-#$(srcdir)/%_wrap.o: $(srcdir)/%_wrap.cpp
-#	$(CXX) $(SWIG_OPTS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(AM_CFLAGS) $(STANDARD_CFLAGS) -fPIC -DPIC -I$(pythonarchdir) $< -c -o $@
-
-$(srcdir)/mysql/cluster/_mysql.so: ndbapi.i mgmapi.i
-	${PYTHON} setup.py build
+
+SUFFIXES = .cxx .i
+
+.i.cpp: $(SWIG_SOURCES)
+	$(SWIG) -c++ -python $(SWIG_OPTS) -o $@ $<
+
+$(srcdir)/mysql/cluster/_ndbapi.so $(srcdir)/mysql/cluster/_mgmapi.so: ndbapi.cpp
mgmapi.cpp
+	 CC="${CXX}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" ${PYTHON}
setup.py build
 
 clean-local:
 	${PYTHON} setup.py clean
 	rm -rf build
 
-install-data-local: ${pythonarch_DATA}
-	${PYTHON} setup.py install
+install: mysql/cluster/_ndbapi.so mysql/cluster/_mgmapi.so
+	CC="${CXX}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" ${PYTHON}
setup.py install --prefix=${DESTDIR}${prefix}
 
-develop: mysql/cluster/_ndbapi.so
-	${PYTHON} setup.py develop
+develop: mysql/cluster/_ndbapi.so mysql/cluster/_mgmapi.so
+	CC="${CXX}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" ${PYTHON}
setup.py develop --prefix=${DESTDIR}${prefix}
 
 

=== modified file 'python/ez_setup.py'
--- a/python/ez_setup.py	2006-11-22 20:17:43 +0000
+++ b/python/ez_setup.py	2007-10-27 09:26:42 +0000
@@ -15,29 +15,36 @@
 """
 import sys
 DEFAULT_VERSION = "0.6c1"
-DEFAULT_URL     = "http://cheeseshop.python.org/packages/%s/s/setuptools/" %
sys.version[:3]
+DEFAULT_URL     = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3]
 
 md5_data = {
-    'setuptools-0.6a1-py2.3.egg': 'ee819a13b924d9696b0d6ca6d1c5833d',
-    'setuptools-0.6a1-py2.4.egg': '8256b5f1cd9e348ea6877b5ddd56257d',
-    'setuptools-0.6a10-py2.3.egg': '162d8357f1aff2b0349c6c247ee62987',
-    'setuptools-0.6a10-py2.4.egg': '803a2d8db501c1ac3b5b6fb4e907f788',
-    'setuptools-0.6a2-py2.3.egg': 'b98da449da411267c37a738f0ab625ba',
-    'setuptools-0.6a2-py2.4.egg': 'be5b88bc30aed63fdefd2683be135c3b',
-    'setuptools-0.6a3-py2.3.egg': 'ee0e325de78f23aab79d33106dc2a8c8',
-    'setuptools-0.6a3-py2.4.egg': 'd95453d525a456d6c23e7a5eea89a063',
-    'setuptools-0.6a4-py2.3.egg': 'e958cbed4623bbf47dd1f268b99d7784',
-    'setuptools-0.6a4-py2.4.egg': '7f33c3ac2ef1296f0ab4fac1de4767d8',
-    'setuptools-0.6a5-py2.3.egg': '748408389c49bcd2d84f6ae0b01695b1',
-    'setuptools-0.6a5-py2.4.egg': '999bacde623f4284bfb3ea77941d2627',
-    'setuptools-0.6a6-py2.3.egg': '7858139f06ed0600b0d9383f36aca24c',
-    'setuptools-0.6a6-py2.4.egg': 'c10d20d29acebce0dc76219dc578d058',
-    'setuptools-0.6a7-py2.3.egg': 'cfc4125ddb95c07f9500adc5d6abef6f',
-    'setuptools-0.6a7-py2.4.egg': 'c6d62dab4461f71aed943caea89e6f20',
-    'setuptools-0.6a8-py2.3.egg': '2f18eaaa3f544f5543ead4a68f3b2e1a',
-    'setuptools-0.6a8-py2.4.egg': '799018f2894f14c9f8bcb2b34e69b391',
-    'setuptools-0.6a9-py2.3.egg': '8e438ad70438b07b0d8f82cae42b278f',
-    'setuptools-0.6a9-py2.4.egg': '8f6e01fc12fb1cd006dc0d6c04327ec1',
+    'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca',
+    'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb',
+    'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b',
+    'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a',
+    'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618',
+    'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac',
+    'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5',
+    'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4',
+    'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c',
+    'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b',
+    'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27',
+    'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277',
+    'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa',
+    'setuptools-0.6c3-py2.4.egg': 'e0ed74682c998bfb73bf803a50e7b71e',
+    'setuptools-0.6c3-py2.5.egg': 'abef16fdd61955514841c7c6bd98965e',
+    'setuptools-0.6c4-py2.3.egg': 'b0b9131acab32022bfac7f44c5d7971f',
+    'setuptools-0.6c4-py2.4.egg': '2a1f9656d4fbf3c97bf946c0a124e6e2',
+    'setuptools-0.6c4-py2.5.egg': '8f5a052e32cdb9c72bcf4b5526f28afc',
+    'setuptools-0.6c5-py2.3.egg': 'ee9fd80965da04f2f3e6b3576e9d8167',
+    'setuptools-0.6c5-py2.4.egg': 'afe2adf1c01701ee841761f5bcd8aa64',
+    'setuptools-0.6c5-py2.5.egg': 'a8d3f61494ccaa8714dfed37bccd3d5d',
+    'setuptools-0.6c6-py2.3.egg': '35686b78116a668847237b69d549ec20',
+    'setuptools-0.6c6-py2.4.egg': '3c56af57be3225019260a644430065ab',
+    'setuptools-0.6c6-py2.5.egg': 'b2f8a7520709a5b34f80946de5f02f53',
+    'setuptools-0.6c7-py2.3.egg': '209fdf9adc3a615e5115b725658e13e2',
+    'setuptools-0.6c7-py2.4.egg': '5a8f954807d46a0fb67cf1f26c55a82e',
+    'setuptools-0.6c7-py2.5.egg': '45d2ad28f9750e7434111fde831e8372',
 }
 
 import sys, os
@@ -52,7 +59,7 @@
                 % egg_name
             )
             sys.exit(2)
-    return data    
+    return data
 
 
 def use_setuptools(
@@ -68,7 +75,7 @@
     be the number of seconds that will be paused before initiating a download,
     should one be required.  If an older version of setuptools is installed,
     this routine will print a message to ``sys.stderr`` and raise SystemExit in
-    an attempt to abort the calling script.  
+    an attempt to abort the calling script.
     """
     try:
         import setuptools
@@ -87,13 +94,13 @@
     try:
         pkg_resources.require("setuptools>="+version)
 
-    except pkg_resources.VersionConflict:
+    except pkg_resources.VersionConflict, e:
         # XXX could we install in a subprocess here?
         print >>sys.stderr, (
             "The required version of setuptools (>=%s) is not available, and\n"
             "can't be installed while this script is running. Please install\n"
-            " a more recent version first."
-        ) % version
+            " a more recent version first.\n\n(Currently using %r)"
+        ) % (version, e.args[0])
         sys.exit(2)
 
 def download_setuptools(
@@ -149,15 +156,15 @@
     try:
         import setuptools
     except ImportError:
-        import tempfile, shutil
-        tmpdir = tempfile.mkdtemp(prefix="easy_install-")
+        egg = None
         try:
-            egg = download_setuptools(version, to_dir=tmpdir, delay=0)
+            egg = download_setuptools(version, delay=0)
             sys.path.insert(0,egg)
             from setuptools.command.easy_install import main
-            main(list(argv)+[egg])
+            return main(list(argv)+[egg])   # we're done here
         finally:
-            shutil.rmtree(tmpdir)
+            if egg and os.path.exists(egg):
+                os.unlink(egg)
     else:
         if setuptools.__version__ == '0.0.1':
             # tell the user to uninstall obsolete version
@@ -183,7 +190,7 @@
             print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)'
 
 
-            
+
 def update_md5(filenames):
     """Update our built-in md5 registry"""
 
@@ -192,7 +199,7 @@
 
     for name in filenames:
         base = os.path.basename(name)
-        f = open(name,'rb')       
+        f = open(name,'rb')
         md5_data[base] = md5(f.read()).hexdigest()
         f.close()
 

=== modified file 'python/mgmapi.i'
--- a/python/mgmapi.i	2007-09-20 12:39:05 +0000
+++ b/python/mgmapi.i	2007-10-27 09:26:42 +0000
@@ -20,8 +20,13 @@
 %module mgmapi
 
 %include "mgmglobals.i"
-
+%include "NdbLogEvent.i"
+%include "NdbLogEventManager.i"
 %include "NdbMgm.i"
+%include "NdbMgmFactory.i"
+%include "ClusterState.i"
+%include "NodeState.i"
+%include "NdbMgmReply.i"
 
 extern int ndb_init(void);
 

=== modified file 'python/ndbapi.i'
--- a/python/ndbapi.i	2007-07-25 17:20:31 +0000
+++ b/python/ndbapi.i	2007-10-27 09:26:42 +0000
@@ -112,6 +112,8 @@
   PyObject * PyExc_NoSuchTableException;
   
 #define NDB_exception(excp, msg) { ndb_throw_exception(excp,msg); SWIG_fail; }
+// TODO: Need to support this form of exception
+#define NDB_exception_err(excp, msg, err) { ndb_throw_exception(excp,msg); SWIG_fail; }
   
   void ndb_throw_exception(NdbException excp_mod, const char * msg) { 
     

=== modified file 'python/testjoin.py'
--- a/python/testjoin.py	2007-09-22 15:14:29 +0000
+++ b/python/testjoin.py	2007-10-27 09:26:42 +0000
@@ -11,15 +11,12 @@
 INSERT_NUM=int(sys.argv[2])
 BATCH_SIZE=1000
 
-db = MySQLdb.connect(host="localhost",user="root",read_default_group="client")
+db = MySQLdb.connect(host="localhost",user="root",read_default_group="client",db="test2")
 
 cur=db.cursor()
 
 print "Dropping and recreating schema\n"
 
-cur.execute("CREATE DATABASE if not exists test")
-cur.execute("USE test")
-
 cur.execute("drop table if exists mytablename")
 
 cur.execute("""
@@ -32,6 +29,7 @@
 ENGINE=NDBCLUSTER 
 """)
 
+print "create"
 cur.execute("drop table if exists myothertable")
 
 cur.execute("""

Thread
Rev 209: Reworked python build to get the MySQL build info directly from automake. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjm...Monty Taylor27 Oct