Changeset: ca0391b881a6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ca0391b881a6
Modified Files:
NT/rules.msc
buildtools/autogen/autogen/msc.py
configure.ag
testing/Makefile.ag
testing/Mtest.py.in
Branch: Oct2012
Log Message:
More python -> {python2,python3} fixes.
diffs (130 lines):
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/msc.py
b/buildtools/autogen/autogen/msc.py
--- a/buildtools/autogen/autogen/msc.py
+++ b/buildtools/autogen/autogen/msc.py
@@ -1029,8 +1029,8 @@ def msc_python_generic(fd, var, python,
fd.write('install_%s:\n' % f)
fd.write('\t$(%s) %s install --prefix "$(prefix)"\n' % (PYTHON, f))
-def msc_python(fd, var, python, msc):
- msc_python_generic(fd, var, python, msc, 'PYTHON')
+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')
@@ -1105,7 +1105,7 @@ output_funcs = {'SUBDIRS': msc_subdirs,
'HEADERS': msc_headers,
'ANT': msc_ant,
'GEM': msc_gem,
- 'PYTHON': msc_python,
+ 'PYTHON2': msc_python2,
'PYTHON3': msc_python3,
}
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -1258,6 +1258,17 @@ AC_SUBST(PYTHON3)
AM_CONDITIONAL(HAVE_PYTHON3, test x"$have_python3" != xno)
AC_SUBST(PYTHON3_LIBDIR)
+AM_CONDITIONAL(HAVE_PYTHON, test x"$have_python2" != xno -o x"$have_python3"
!= xno)
+
+if test "x$PYTHON" = xno; then
+ if test "x$PYTHON2" != xno; then
+ PYTHON="$PYTHON2"
+ elif test "x$PYTHON3" != xno; then
+ PYTHON="$PYTHON3"
+ fi
+fi
+AC_SUBST(PYTHON)
+
# Mtest/Mfilter currently require Python 2
if test "x$enable_testing" != xno ; then
if test "x$PYTHON2" = xfalse ; then
diff --git a/testing/Makefile.ag b/testing/Makefile.ag
--- a/testing/Makefile.ag
+++ b/testing/Makefile.ag
@@ -44,7 +44,7 @@ scripts_py = {
headers_python = {
HEADERS = py
- DIR = $(prefix)/$(PYTHON_LIBDIR)/MonetDBtesting
+ DIR = $(prefix)/$(PYTHON2_LIBDIR)/MonetDBtesting
SOURCES = trace.py process.py monet_options.py.in __init__.py
subprocess26.py listexports.py.in
}
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -292,6 +292,7 @@ CONDITIONALS = {
'HAVE_PCRE' : "@HAVE_PCRE_FALSE@",
'HAVE_PERL' : "@HAVE_PERL_FALSE@",
'HAVE_PYTHON' : "@HAVE_PYTHON_FALSE@",
+ 'HAVE_PYTHON2' : "@HAVE_PYTHON2_FALSE@",
'HAVE_PYTHON3' : "@HAVE_PYTHON3_FALSE@",
'HAVE_RAPTOR' : "@HAVE_RAPTOR_FALSE@",
'HAVE_RUBYGEM' : "@HAVE_RUBYGEM_FALSE@",
@@ -3577,7 +3578,7 @@ def main(argv) :
# inject vars that tell various languages where to find their libs
env['PERL5LIB'] = _configure(os.path.join('@QXprefix@', '@PERL_LIBDIR@'))
# set dynamically for python test lib
-# env['PYTHONPATH'] = _configure(os.path.join('@QXprefix@',
'@PYTHON_LIBDIR@'))
+# env['PYTHONPATH'] = _configure(os.path.join('@QXprefix@',
'@PYTHON2_LIBDIR@'))
env['PHP_INCPATH'] = _configure(os.path.join('@datadir@', 'php'))
env['BINDIR'] = _configure('@bindir@')
vars_ = vars_ + ['PERL5LIB', 'PHP_INCPATH', 'BINDIR']
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list