Changeset: 76854bc56ffd for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=76854bc56ffd
Removed Files:
clients/python2/ChangeLog
clients/python2/ChangeLog-Archive
clients/python2/ChangeLog.Jun2016
clients/python2/MANIFEST.in
clients/python2/Makefile.ag
clients/python2/README.rst
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/dbapi20.py
clients/python2/test/run.cmd
clients/python2/test/run.sh
clients/python2/test/runtests.py
clients/python2/test/test_control.py
clients/python2/test/test_monetize.py
clients/python2/test/test_pythonize.py
clients/python3/ChangeLog
clients/python3/ChangeLog-Archive
clients/python3/ChangeLog.Jun2016
clients/python3/MANIFEST.in
clients/python3/Makefile.ag
clients/python3/README.rst
clients/python3/monetdb/__init__.py
clients/python3/monetdb/control.py
clients/python3/monetdb/exceptions.py
clients/python3/monetdb/mapi.py
clients/python3/monetdb/sql/__init__.py
clients/python3/monetdb/sql/connections.py
clients/python3/monetdb/sql/converters.py
clients/python3/monetdb/sql/cursors.py
clients/python3/monetdb/sql/monetize.py
clients/python3/monetdb/sql/pythonize.py
clients/python3/monetdb/sql/types.py
clients/python3/setup.py
clients/python3/test/capabilities.py
clients/python3/test/dbapi20.py
clients/python3/test/run.cmd
clients/python3/test/run.sh
clients/python3/test/runtests.py
clients/python3/test/test_control.py
clients/python3/test/test_monetize.py
clients/python3/test/test_pythonize.py
monetdb5/tests/BugReports/Tests/no.146.stable.out
sql/test/mapi/Tests/python2_test_monetdb_sql.SQL.bat
sql/test/mapi/Tests/python2_test_monetdb_sql.SQL.sh
sql/test/mapi/Tests/python2_test_monetdb_sql.stable.err
sql/test/mapi/Tests/python2_test_monetdb_sql.stable.out
sql/test/mapi/Tests/python3_test_monetdb_sql.SQL.bat
sql/test/mapi/Tests/python3_test_monetdb_sql.SQL.sh
sql/test/mapi/Tests/python3_test_monetdb_sql.stable.err
sql/test/mapi/Tests/python3_test_monetdb_sql.stable.out
Modified Files:
MonetDB.spec
NT/Makefile
buildtools/autogen/autogen/am.py
buildtools/autogen/autogen/msc.py
clients/Makefile.ag
clients/Tests/SQL-dump.stable.out
clients/Tests/SQL-dump.stable.out.int128
clients/examples/python/basics.py
clients/examples/python/mclient-python2.py
clients/examples/python/mclient-python3.py
clients/examples/python/perf.py
clients/examples/python/sqlsample.py
geom/sql/Makefile.ag
sql/backends/monet5/UDF/README
sql/backends/monet5/sql.c
sql/benchmarks/tpch/fileleak/Tests/All
sql/benchmarks/tpch/fileleak/Tests/delete_all.SQL.py
sql/benchmarks/tpch/fileleak/Tests/leaks.SQL.py
sql/test/BugTracker-2011/Tests/All
sql/test/BugTracker-2011/Tests/python-connections-Bug.2901.SQL.py
sql/test/BugTracker-2013/Tests/All
sql/test/BugTracker-2013/Tests/python-explain.Bug-3380.SQL.py
sql/test/BugTracker-2014/Tests/All
sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.py
sql/test/BugTracker-2014/Tests/copy-into.Bug-3481.SQL.py
sql/test/BugTracker-2014/Tests/python-microseconds.Bug-3439.SQL.py
sql/test/BugTracker-2015/Tests/All
sql/test/BugTracker-2015/Tests/acidity2-fail.Bug-3635.SQL.py
sql/test/BugTracker-2015/Tests/concurrent-schema.Bug-3826.SQL.py
sql/test/BugTracker-2015/Tests/schemadiff.Bug-3778.SQL.py
sql/test/BugTracker/Tests/All
sql/test/BugTracker/Tests/python_escape.SF-1916844.SQL.py
sql/test/Users/Tests/All
sql/test/Users/Tests/grantAndRevokeUserLogedIN.Bug-3476.SQL.py
sql/test/concurrent/Tests/All
sql/test/concurrent/Tests/crash_on_concurrent_use.SF-1411926.SQL.py
sql/test/concurrent/Tests/simple_select.SQL.py
sql/test/mapi/Tests/All
sql/test/mapi/Tests/python_dec38.py
sql/test/mapi/Tests/python_int128.py
sql/test/remote/Tests/All
sql/test/remote/Tests/ssbm.SQL.py
testing/Mtest.py.in
Branch: cand
Log Message:
merged with default
diffs (truncated from 8662 to 300 lines):
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -101,6 +101,15 @@
%endif
%endif
+%{!?__python2: %global __python2 %__python}
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from
distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+
+%if 0%{?fedora}
+%bcond_without python3
+%else
+%bcond_with python3
+%endif
+
Name: %{name}
Version: %{version}
Release: %{release}
@@ -144,9 +153,6 @@ BuildRequires: openssl-devel
BuildRequires: pcre-devel >= 4.5
BuildRequires: perl
BuildRequires: python-devel
-%if %{?rhel:0}%{!?rhel:1}
-BuildRequires: python3-devel
-%endif
BuildRequires: readline-devel
BuildRequires: unixODBC-devel
# BuildRequires: uriparser-devel
@@ -164,12 +170,6 @@ Recommends: MonetDB5-server%{?_isa} = %{
Suggests: %{name}-client%{?_isa} = %{version}-%{release}
%endif
-# need to define python_sitelib on RHEL 5 and older
-# no need to define python3_sitelib: it's defined by python3-devel
-%if 0%{?rhel} && 0%{?rhel} <= 5
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print(get_python_lib())")}
-%endif
-
%description
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
@@ -416,7 +416,7 @@ Requires: %{name}-client-odbc%{?_isa} =
Requires: %{name}-client-perl = %{version}-%{release}
Requires: %{name}-client-php = %{version}-%{release}
Requires: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
-Requires: python-monetdb = %{version}-%{release}
+Requires: python-monetdb >= 1.0
%description client-tests
MonetDB is a database management system that is developed from a
@@ -833,55 +833,6 @@ frontend of MonetDB.
%{_libdir}/monetdb5/sql*_hge.mal
%endif
-%package -n python-monetdb
-Summary: Native MonetDB client Python API
-Group: Applications/Databases
-Requires: python
-BuildArch: noarch
-Obsoletes: MonetDB-client-python
-
-%description -n python-monetdb
-MonetDB is a database management system that is developed from a
-main-memory perspective with use of a fully decomposed storage model,
-automatic index management, extensibility of data types and search
-accelerators. It also has an SQL frontend.
-
-This package contains the files needed to use MonetDB from a Python
-program. This package is for Python version 2. If you want to use
-Python version 3, you need %{name}-python3-monetdb.
-
-%files -n python-monetdb
-%defattr(-,root,root)
-%dir %{python_sitelib}/monetdb
-%{python_sitelib}/monetdb/*
-%{python_sitelib}/python_monetdb-*.egg-info
-%doc clients/python2/README.rst
-
-%if %{?rhel:0}%{!?rhel:1}
-%package -n python3-monetdb
-Summary: Native MonetDB client Python3 API
-Group: Applications/Databases
-Requires: python3
-BuildArch: noarch
-
-%description -n python3-monetdb
-MonetDB is a database management system that is developed from a
-main-memory perspective with use of a fully decomposed storage model,
-automatic index management, extensibility of data types and search
-accelerators. It also has an SQL frontend.
-
-This package contains the files needed to use MonetDB from a Python3
-program. This package is for Python version 3. If you want to use
-Python version 2, you need %{name}-python-monetdb.
-
-%files -n python3-monetdb
-%defattr(-,root,root)
-%dir %{python3_sitelib}/monetdb
-%{python3_sitelib}/monetdb/*
-%{python3_sitelib}/python_monetdb-*.egg-info
-%doc clients/python3/README.rst
-%endif
-
%package testing
Summary: MonetDB - Monet Database Management System
Group: Applications/Databases
@@ -925,8 +876,8 @@ developer, but if you do want to test, t
%defattr(-,root,root)
%{_bindir}/Mapprove.py
%{_bindir}/Mtest.py
-%dir %{python_sitelib}/MonetDBtesting
-%{python_sitelib}/MonetDBtesting/*
+%dir %{python2_sitelib}/MonetDBtesting
+%{python2_sitelib}/MonetDBtesting/*
%prep
%setup -q
@@ -976,8 +927,7 @@ developer, but if you do want to test, t
--with-perl-libdir=lib/perl5 \
--with-proj=no \
--with-pthread=yes \
- --with-python2=yes \
- --with-python3=%{?rhel:no}%{!?rhel:yes} \
+ --with-python=yes \
--with-readline=yes \
--with-samtools=%{?with_samtools:yes}%{!?with_samtools:no} \
--with-sphinxclient=no \
diff --git a/NT/Makefile b/NT/Makefile
--- a/NT/Makefile
+++ b/NT/Makefile
@@ -26,7 +26,7 @@ install: targetdirs all
$(INSTALL) ..\NT\installer$(bits)\*.vdproj "$(prefix)"
$(srcdir)\Makefile.msc: "$(srcdir)\Makefile.ag"
- cd "$(srcdir)"&&set PYTHONPATH=buildtools\autogen&&python
buildtools\autogen\autogen.py
+ cd "$(srcdir)"&&set PYTHONPATH=buildtools\autogen&&$(PYTHON)
buildtools\autogen\autogen.py
monetdb_config.h: "$(TOPDIR)\winconfig_conds.py"
"$(srcdir)\NT\monetdb_config.h.in"
$(CONFIGURE) "$(srcdir)\NT\monetdb_config.h.in" > monetdb_config.h
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
@@ -829,47 +829,6 @@ def am_library(fd, var, libmap, am):
am_deps(fd, libmap['DEPS'], am)
-def am_python_generic(fd, var, python, am, PYTHON):
- pyre = re.compile(r'packages *= *\[ *(.*[^ ]) *\]')
- pynmre = re.compile('name *= *([\'"])([^\'"]+)\\1')
- fd.write('all-local-%s:\n' % var)
- am['ALL'].append(var)
- am['INSTALL'].append(var)
- am['UNINSTALL'].append(var)
- pkgdirs = []
- pkgnams = []
- for f in python['FILES']:
- fd.write("\t[ '$(srcdir)' -ef . ] || cp -p '$(srcdir)/%s' '%s'\n" %
(f, f))
- pkgs = map(lambda x: x.strip('\'" '),
- pyre.search(open(os.path.join(am['CWDRAW'],
f)).read()).group(1).split(', '))
- pkgnams.append(pynmre.search(open(os.path.join(am['CWDRAW'],
f)).read()).group(2))
- for pkg in pkgs:
- pkgdir = posixpath.join(*pkg.split('.'))
- pkgdirs.append(pkgdir)
- fd.write("\t[ '$(srcdir)' -ef . ] || mkdir -p '%s'\n" % pkgdir)
- fd.write("\t[ '$(srcdir)' -ef . ] || cp -p '$(srcdir)/%s'/*.py
'%s'\n" % (pkgdir, pkgdir))
- fd.write("\t[ '$(srcdir)' -ef . ] || cp -p '$(srcdir)/README.rst' .\n")
- fd.write("\t$(%s) '%s' build\n" % (PYTHON, f))
- fd.write('install-exec-local-%s:\n' % var)
- for f in python['FILES']:
- # see buildtools/conf/rules.mk for PY_INSTALL_LAYOUT
- # it is needed to install into dist-packages on Debian/Ubuntu
- fd.write("\t$(%s) '%s' install $(PY_INSTALL_LAYOUT)
--prefix='$(DESTDIR)$(prefix)'\n" % (PYTHON, f))
- fd.write('uninstall-local-%s:\n' % var)
- for pkgdir in sorted(pkgdirs, reverse = True):
- fd.write("\trm -r '$(DESTDIR)$(prefix)/$(%s_LIBDIR)/%s'\n" % (PYTHON,
pkgdir))
- for name in pkgnams:
- fd.write("\trm '$(DESTDIR)$(prefix)/$(%s_LIBDIR)'/%s-*.egg-info\n" %
(PYTHON, name.replace('-', '_')))
- fd.write('mostlyclean-local:\n')
- for pkgdir in sorted(pkgdirs, reverse = True):
- fd.write("\t[ '$(srcdir)' -ef . -o ! -d '%s' ] || rm -r '%s'\n" %
(pkgdir, pkgdir))
-
-def am_python2(fd, var, python, am):
- am_python_generic(fd, var, python, am, 'PYTHON2')
-
-def am_python3(fd, var, python3, am):
- am_python_generic(fd, var, python3, am, 'PYTHON3')
-
def am_ant(fd, var, ant, am):
target = var[4:] # the ant target to call
@@ -996,8 +955,6 @@ output_funcs = {'SUBDIRS': am_subdirs,
'largeTOC_SHARED_MODS': am_mods_to_libs,
'HEADERS': am_headers,
'ANT': am_ant,
- 'PYTHON2': am_python2,
- 'PYTHON3': am_python3,
}
def output(tree, cwd, topdir, automake, conditional):
diff --git a/buildtools/autogen/autogen/msc.py
b/buildtools/autogen/autogen/msc.py
--- a/buildtools/autogen/autogen/msc.py
+++ b/buildtools/autogen/autogen/msc.py
@@ -872,32 +872,6 @@ def msc_includes(fd, var, values, msc):
+ msc_add_srcdir(i, msc, " -I")
fd.write("INCLUDES = " + incs + "\n")
-def msc_python_generic(fd, var, python, msc, PYTHON):
- pyre = re.compile(r'packages *= *\[ *(.*[^ ]) *\]')
- for f in python['FILES']:
- msc['SCRIPTS'].append('target_python_%s' % f)
- srcs = map(lambda x: x.strip('\'" ').replace('.', '\\'),
- pyre.search(open(os.path.join(msc['cwd'],
f)).read()).group(1).split(', '))
- fd.write('target_python_%s: %s README.rst %s\n' % (f, ' '.join(srcs),
f))
- fd.write('\t$(%s) %s build\n' % (PYTHON, f))
- for src in srcs:
- fd.write('%s: "$(srcdir)\\%s"\n' % (src, src))
- fd.write('\tif not exist "%s" $(MKDIR) "%s"\n' % (src, src))
- fd.write('\t$(INSTALL) "$(srcdir)\\%s"\\*.py "%s"\n' % (src, src))
- fd.write('%s: "$(srcdir)\\%s"\n' % (f, f))
- fd.write('\t$(INSTALL) "$(srcdir)\\%s" "%s"\n' % (f, f))
- fd.write('README.rst: "$(srcdir)\\README.rst"\n')
- fd.write('\t$(INSTALL) "$(srcdir)\\README.rst" "README.rst"\n')
- msc['INSTALL'][f] = f, '', '', '', ''
- fd.write('install_%s:\n' % f)
- fd.write('\t$(%s) %s install --prefix "$(prefix)" --install-lib
"$(prefix)\\lib\\%s\n' % (PYTHON, f, PYTHON.lower()))
-
-def msc_python2(fd, var, python, msc):
- msc_python_generic(fd, var, python, msc, 'PYTHON2')
-
-def msc_python3(fd, var, python3, msc):
- msc_python_generic(fd, var, python3, msc, 'PYTHON3')
-
callantno = 0
def msc_ant(fd, var, ant, msc):
global callantno
@@ -966,8 +940,6 @@ output_funcs = {'SUBDIRS': msc_subdirs,
'largeTOC_SHARED_MODS': msc_mods_to_libs,
'HEADERS': msc_headers,
'ANT': msc_ant,
- 'PYTHON2': msc_python2,
- 'PYTHON3': msc_python3,
}
def output(tree, cwd, topdir):
diff --git a/clients/Makefile.ag b/clients/Makefile.ag
--- a/clients/Makefile.ag
+++ b/clients/Makefile.ag
@@ -4,6 +4,6 @@
#
# Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
-SUBDIRS = HAVE_MAPI?mapilib HAVE_MAPI?mapiclient HAVE_ODBC?odbc HAVE_PERL?perl
php examples HAVE_PYTHON2?python2 HAVE_PYTHON3?python3 NATIVE_WIN32?NT
+SUBDIRS = HAVE_MAPI?mapilib HAVE_MAPI?mapiclient HAVE_ODBC?odbc HAVE_PERL?perl
php examples NATIVE_WIN32?NT
-EXTRA_DIST_DIR = Tests ruby
+EXTRA_DIST_DIR = Tests ruby R
diff --git a/clients/Tests/SQL-dump.stable.out
b/clients/Tests/SQL-dump.stable.out
--- a/clients/Tests/SQL-dump.stable.out
+++ b/clients/Tests/SQL-dump.stable.out
@@ -7179,6 +7179,7 @@ drop function pcre_replace(string, strin
[ 12, "SEQUENCE" ]
[ 13, "PROCEDURE" ]
[ 14, "BE_DROPPED" ]
+[ 15, "TYPE" ]
#drop function pcre_replace(string, string, string, string);
# 13:32:07 >
diff --git a/clients/Tests/SQL-dump.stable.out.int128
b/clients/Tests/SQL-dump.stable.out.int128
--- a/clients/Tests/SQL-dump.stable.out.int128
+++ b/clients/Tests/SQL-dump.stable.out.int128
@@ -7728,6 +7728,7 @@ drop function pcre_replace(string, strin
[ 12, "SEQUENCE" ]
[ 13, "PROCEDURE" ]
[ 14, "BE_DROPPED" ]
+[ 15, "TYPE" ]
#drop function pcre_replace(string, string, string, string);
# 15:15:20 >
diff --git a/clients/examples/python/basics.py
b/clients/examples/python/basics.py
--- a/clients/examples/python/basics.py
+++ b/clients/examples/python/basics.py
@@ -10,18 +10,9 @@ import logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('monetdb')
-try:
- import monetdb.sql
-except ImportError:
- # running examples from development tree
- import sys
- import os
- parent = os.path.join(sys.path[0], os.pardir)
- sys.path.append(parent)
- import monetdb.sql
+import pymonetdb
-
-x = monetdb.sql.connect(username="monetdb", password="monetdb",
hostname="localhost", database="demo")
+x = pymonetdb.connect(username="monetdb", password="monetdb",
hostname="localhost", database="demo")
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list