Changeset: 476018a9e5ca for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=476018a9e5ca
Added Files:
        clients/python2/MANIFEST.in
        clients/python2/Makefile.ag
        clients/python2/README.rst
        clients/python2/examples/basics.py
        clients/python2/examples/mclient.py
        clients/python2/examples/perf.py
        clients/python2/monetdb/__init__.py
        clients/python2/monetdb/control.py
        clients/python2/monetdb/exceptions.py
        clients/python2/monetdb/mapi.py
        clients/python2/monetdb/sql/__init__.py
        clients/python2/monetdb/sql/connections.py
        clients/python2/monetdb/sql/converters.py
        clients/python2/monetdb/sql/cursors.py
        clients/python2/monetdb/sql/monetize.py
        clients/python2/monetdb/sql/pythonize.py
        clients/python2/monetdb/sql/types.py
        clients/python2/setup.py
        clients/python2/test/capabilities.py
        clients/python2/test/control.py
        clients/python2/test/dbapi20.py
        clients/python2/test/run.sh
        clients/python2/test/runtests.py
        clients/python2/test/test_control.py
        sql/test/BugTracker-2012/Tests/inet-casts.Bug-3205.sql
        sql/test/BugTracker-2012/Tests/inet-casts.Bug-3205.stable.err
        sql/test/BugTracker-2012/Tests/inet-casts.Bug-3205.stable.out
Removed Files:
        clients/python/MANIFEST.in
        clients/python/Makefile.ag
        clients/python/README.rst
        clients/python/examples/basics.py
        clients/python/examples/mclient.py
        clients/python/examples/perf.py
        clients/python/monetdb/__init__.py
        clients/python/monetdb/control.py
        clients/python/monetdb/exceptions.py
        clients/python/monetdb/mapi.py
        clients/python/monetdb/sql/__init__.py
        clients/python/monetdb/sql/connections.py
        clients/python/monetdb/sql/converters.py
        clients/python/monetdb/sql/cursors.py
        clients/python/monetdb/sql/monetize.py
        clients/python/monetdb/sql/pythonize.py
        clients/python/monetdb/sql/types.py
        clients/python/setup.py
        clients/python/test/capabilities.py
        clients/python/test/control.py
        clients/python/test/dbapi20.py
        clients/python/test/run.sh
        clients/python/test/runtests.py
        clients/python/test/test_control.py
        sql/test/Connections/run.all
        sql/test/Update_Delete_action/run.all
Modified Files:
        MonetDB.spec
        NT/monetdb_config.h.in
        NT/rules.msc
        buildtools/autogen/autogen.py
        buildtools/autogen/autogen/am.py
        buildtools/autogen/autogen/codegen.py
        buildtools/autogen/autogen/msc.py
        buildtools/autogen/autogen/var.py
        clients/Makefile.ag
        clients/mapiclient/ReadlineTools.c
        clients/mapiclient/Tests/mclient--help.stable.err.Windows
        clients/python3/setup.py
        configure.ag
        debian/rules
        gdk/gdk_aggr.c
        gdk/gdk_calc.c
        gdk/gdk_sample.c
        gdk/gdk_select.c
        gdk/gdk_setop.mx
        monetdb5/mal/Tests/run
        monetdb5/mal/mal_dataflow.c
        monetdb5/modules/atoms/inet.c
        monetdb5/scheduler/Tests/oct02.mal
        
monetdb5/tests/BugDay_2005-10-06_4.8/Tests/multiple_servers.SF-914113.MIL.bat
        
monetdb5/tests/BugDay_2005-10-06_4.8/Tests/multiple_servers.SF-914113.MIL.sh
        monetdb5/tests/BugDay_2005-10-06_4.9.3/Tests/monet_daemon.SF-623743
        monetdb5/tests/BugDay_2005-10-06_4.9.3/Tests/monet_daemon.SF-623743.bat
        monetdb5/tests/BugsViaSourgeforce/Tests/ID.905495s.bat
        sql/backends/monet5/embeddedclient.c.in
        sql/backends/monet5/sql_scenario.c
        sql/test/BugTracker-2010/Tests/Mbedded-crash.Bug-2701
        sql/test/BugTracker-2010/Tests/Mbedded-crash.Bug-2701.bat
        sql/test/BugTracker-2012/Tests/All
        sql/test/mapi/Tests/python_test_monetdb_sql.SQL.bat
        sql/test/mapi/Tests/python_test_monetdb_sql.SQL.sh
        testing/Makefile.ag
        testing/Mfilter.py.in
        testing/Mtest.py.in
        testing/README
        testing/cmptests.py
        testing/listexports.py.in
        testing/process.py
        testing/quicktest
        testing/subprocess26.py
        vertoo.config
Branch: Feb2013
Log Message:

Merge with Feb2013


diffs (truncated from 4475 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -538,7 +538,7 @@ program.
 %dir %{python_sitelib}/monetdb
 %{python_sitelib}/monetdb/*
 %{python_sitelib}/python_monetdb-*.egg-info
-%doc clients/python/README.rst
+%doc clients/python2/README.rst
 
 %package -n python3-monetdb
 Summary: Native MonetDB client Python3 API
@@ -650,7 +650,7 @@ developer, but if you do want to test, t
        --with-mseed=no \
        --with-perl=yes \
        --with-pthread=yes \
-       --with-python=yes \
+       --with-python2=yes \
        --with-python3=yes \
        --with-readline=yes \
        --with-rubygem=yes \
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -614,6 +614,9 @@
 /* Define if you have _sys_siglist */
 /* #undef HAVE__SYS_SIGLIST */
 
+/* Define to 1 if the system has the type `__int128'. */
+/* #undef HAVE___INT128 */
+
 /* Define to 1 if the system has the type `__int64'. */
 #define HAVE___INT64 1
 
diff --git a/NT/rules.msc b/NT/rules.msc
--- a/NT/rules.msc
+++ b/NT/rules.msc
@@ -74,13 +74,13 @@ PTHREAD_LIBS =
 ODBCINST_LIBS = odbccp32.lib user32.lib
 ODBC_LIBS = odbc32.lib
 
-!IFNDEF PYTHONBASE
-PYTHONBASE=C:\Python27
+!IFNDEF PYTHON2BASE
+PYTHON2BASE=C:\Python27
 !ENDIF
-!IFNDEF PYTHONLIB
-PYTHONLIB=python27.lib
+!IFNDEF PYTHON2LIB
+PYTHON2LIB=python27.lib
 !ENDIF
-PYTHON_LIBDIR=share\MonetDB\python
+PYTHON2_LIBDIR=share\MonetDB\python
 
 !IFNDEF PYTHON3BASE
 PYTHON3BASE=C:\Python32
@@ -177,7 +177,8 @@ RUBY_DIR = lib\ruby\gems\1.9.1
 
 # some programs we use, probably no need to edit
 
-# install python, flex and bison on your systems 
+# install python, flex and bison on your systems
+# PYTHON may be either a version 2 or a version 3
 PYTHON = python
 YACC = bison
 LEX = flex
@@ -370,6 +371,11 @@ create_winconfig_conds_new_py:
 !ELSE
        $(ECHO) HAVE_PYTHON_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
 !ENDIF
+!IFDEF HAVE_PYTHON2
+       $(ECHO) HAVE_PYTHON2_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py"
+!ELSE
+       $(ECHO) HAVE_PYTHON2_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
+!ENDIF
 !IFDEF HAVE_PYTHON3
        $(ECHO) HAVE_PYTHON3_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py"
 !ELSE
@@ -436,7 +442,8 @@ CONFIGURE=$(PYTHON) $(CONFIGURE_PY) \
        "PACKAGE=$(pkg)" \
        "PERL_LIBDIR=$(PERL_LIBDIR)" \
        "PYTHON=$(PYTHON)" \
-       "PYTHON_LIBDIR=$(PYTHON_LIBDIR)" \
+       "PYTHON2=$(PYTHON2)" \
+       "PYTHON2_LIBDIR=$(PYTHON2_LIBDIR)" \
        "PYTHON3=$(PYTHON3)" \
        "PYTHON3_LIBDIR=$(PYTHON3_LIBDIR)" \
        "RUBY_DIR=$(RUBY_DIR)" \
diff --git a/buildtools/autogen/autogen.py b/buildtools/autogen/autogen.py
--- a/buildtools/autogen/autogen.py
+++ b/buildtools/autogen/autogen.py
@@ -77,7 +77,7 @@ class parser:
         elif self.state == "=" and isName(token):
             if token == '""':
                 token = ""
-            if self.top.has_key(token):
+            if token in self.top:
                 for i in self.top[token]:
                     self.curvar.append(i)
             else:
@@ -92,7 +92,7 @@ def read_makefile(p, cwd):
     lineno = 0
     for line in fileinput.input(os.path.join(cwd, 'Makefile.ag')):
         if line.lstrip()[0:1] != "#":
-            for token in string.split(line):
+            for token in line.split():
                 p.parse(token, lineno, line)
             p.parse("\n", lineno, line)
         lineno = lineno + 1
@@ -109,19 +109,19 @@ def expand_subdirs(subdirs):
     res = []
     for subdir in subdirs:
         if "?" in subdir:
-            parts = string.split(subdir, "?")
+            parts = subdir.split("?")
             if len(parts) == 2:
-                dirs = string.split(parts[1], ":")
+                dirs = parts[1].split(":")
                 if len(dirs) > 2:
-                    print "!ERROR:syntax error in conditional subdir:", subdir
+                    print("!ERROR:syntax error in conditional subdir: " + 
subdir)
                 else:
                     cond = parts[0]
                     for d in dirs:
-                        if string.strip(d) != "":
+                        if d.strip() != "":
                             res.append((d, cond))
                         cond = "!" + cond
             else:
-                print "!ERROR:syntax error in conditional subdir:", subdir
+                print("!ERROR:syntax error in conditional subdir: " + subdir)
         else:
             res.append((subdir, None))
     return res
@@ -133,7 +133,7 @@ def main(cwd, topdir, automake, incdirsm
     codegen(p.curvar, cwd, topdir, incdirsmap)
     (InstallList, DocList, OutList) = am.output(p.curvar, cwd, topdir, 
automake, conditional)
     msc.output(p.curvar, cwd, topdir)
-    if p.curvar.has_key('SUBDIRS'):
+    if 'SUBDIRS' in p.curvar:
         for (dir, cond) in expand_subdirs(p.curvar['SUBDIRS']):
             d = os.path.join(cwd, dir)
             if os.path.exists(d):
@@ -172,18 +172,7 @@ def filter(st):
         return st + '\n'
     return ''
 
-def dirlen(l, r):
-    if string.count(l, os.sep) < string.count(r, os.sep):
-        return -1
-    elif string.count(l, os.sep) > string.count(r, os.sep):
-        return 1
-    elif l < r:
-        return -1
-    elif l > r:
-        return 1
-    return 0
-
-OutList.sort(dirlen)
+OutList.sort(key=lambda x: x.count(os.sep))
 OutList = map(filter, OutList)
 OutListFd = open("acout.in", "w")
 OutListFd.writelines(OutList)
diff --git a/buildtools/autogen/autogen/am.py b/buildtools/autogen/autogen/am.py
--- a/buildtools/autogen/autogen/am.py
+++ b/buildtools/autogen/autogen/am.py
@@ -17,6 +17,8 @@
 
 import os
 import posixpath
+import sys
+sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
 from codegen import find_org
 import re
 
@@ -72,9 +74,9 @@ def am_sort_libs(libs, tree):
     for (pref,lib,sep,cond) in libs:
         after = -1
         # does lib depend on another library
-        if tree.has_key('lib_'+ lib):
+        if 'lib_'+ lib in tree:
             v = tree['lib_'+lib]
-            if v.has_key("LIBS"):
+            if "LIBS" in v:
                 for l in v['LIBS']:
                     if len(l) > 3:
                         l = l[3:] # strip lib prefix
@@ -82,9 +84,9 @@ def am_sort_libs(libs, tree):
                         pos = res.index(l)
                         if pos > after:
                             after = pos
-        elif tree.has_key('LIBS'):
+        elif 'LIBS' in tree:
             v = tree['LIBS']
-            if v.has_key(lib[1:] + "_DLIBS"):
+            if lib[1:] + "_DLIBS" in v:
                 for l in v[lib[1:] + '_DLIBS']:
                     if len(l) > 3:
                         l = l[3:] # strip lib prefix
@@ -157,14 +159,14 @@ def am_find_srcs(target, deps, am, cond)
     base, ext = split_filename(target)
     f = target
     pf = f
-    while ext != "h" and deps.has_key(f):
+    while ext != "h" and f in deps:
         f = deps[f][0]
         b, ext = split_filename(f)
         if ext in automake_ext:
             pf = f
 
     # built source if has dep and ext != cur ext
-    if not(cond) and deps.has_key(pf) and pf not in am['BUILT_SOURCES']:
+    if not(cond) and pf in deps and pf not in am['BUILT_SOURCES']:
         pfb, pfext = split_filename(pf)
         sfb, sfext = split_filename(deps[pf][0])
         if sfext != pfext:
@@ -178,7 +180,7 @@ def am_find_srcs(target, deps, am, cond)
     return dist, ""
 
 def am_find_hdrs_r(am, target, deps, hdrs, hdrs_ext, map):
-    if deps.has_key(target):
+    if target in deps:
         tdeps = deps[target]
         for dtarget in tdeps:
             t, ext = split_filename(dtarget)
@@ -189,7 +191,7 @@ def am_find_hdrs_r(am, target, deps, hdr
                 am_find_hdrs_r(am, dtarget, deps, hdrs, hdrs_ext, map)
 
 def am_find_hdrs(am, map):
-    if map.has_key('HEADERS'):
+    if 'HEADERS' in map:
         hdrs_ext = map['HEADERS']
         for target in map['TARGETS']:
             t, ext = split_filename(target)
@@ -312,11 +314,11 @@ def am_scripts(fd, var, scripts, am):
 
     s, ext = var.split('_', 1)
     ext = [ ext ]
-    if scripts.has_key("EXT"):
+    if "EXT" in scripts:
         ext = scripts["EXT"] # list of extentions
 
     sd = "bindir"
-    if scripts.has_key("DIR"):
+    if "DIR" in scripts:
         sd = scripts["DIR"][0] # use first name given
     sd = am_translate_dir(sd, am)
 
@@ -331,7 +333,7 @@ def am_scripts(fd, var, scripts, am):
         cond = ''
         s = script
         scriptname = "script_" + script
-        if scripts.has_key('COND'):
+        if 'COND' in scripts:
             condname = '+'.join(scripts['COND'])
             mkname = am_normalize(script.replace('.', '_'))
             cond = '#' + condname
@@ -376,7 +378,7 @@ def am_scripts(fd, var, scripts, am):
             fd.write("uninstall-local-%s: \n" % script)
             fd.write("\t$(RM) $(DESTDIR)%s/%s\n\n" % (sd, script))
 
-        if not scripts.has_key('NOINST'):
+        if 'NOINST' not in scripts:
             am['INSTALL'].append(s)
             am['UNINSTALL'].append(s)
             am['InstallList'].append("\t"+sd+"/"+script+cond+"\n")
@@ -398,7 +400,7 @@ def uniq(l):
 def am_headers(fd, var, headers, am):
 
     sd = "includedir"
-    if headers.has_key("DIR"):
+    if "DIR" in headers:
         sd = headers["DIR"][0] # use first name given
     sd = am_translate_dir(sd, am)
 
@@ -415,7 +417,7 @@ def am_headers(fd, var, headers, am):
             continue
         cond = ''
         h = header
-        if headers.has_key('COND'):
+        if 'COND' in headers:
             cond = '#' + '+'.join(headers['COND'])
             mkname = am_normalize(header.replace('.', '_'))
             for condname in headers['COND']:
@@ -496,25 +498,25 @@ def am_binary(fd, var, binmap, am):
 
     SCRIPTS = []
     scripts_ext = []
-    if binmap.has_key('SCRIPTS'):
+    if 'SCRIPTS' in binmap:
         scripts_ext = binmap['SCRIPTS']
 
     name = var[4:]
-    if binmap.has_key("NAME"):
+    if "NAME" in binmap:
         binname = binmap['NAME'][0]
     else:
         binname = name
     norm_binname = am_normalize(binname)
 
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to