Changeset: b372f2c10407 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b372f2c10407
Modified Files:
        configure.ag
        monetdb5/extras/pyapi/pyapi.c
        testing/Mtest.py.in
Branch: python3udf
Log Message:

Minor fixes for tests.


diffs (57 lines):

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2325,7 +2325,8 @@ AM_CONDITIONAL(HAVE_LIBR, test x"$have_l
 have_libpy=no
 have_libpandas=no
 have_libscipy=no
-if test "x$enable_pyintegration" != xno; then
+# we can only have either python2 or python3 integration at the moment, so if 
python3 integration is enabled we disable python2 integration
+if test "x$enable_pyintegration" != xno && test "x$enable_py3integration" != 
xyes; then
        case "$enable_pyintegration" in
        yes|auto)
                XPATH="$PATH"
@@ -2416,7 +2417,7 @@ AM_CONDITIONAL(HAVE_LIBSCIPY, test x"$ha
 
 # Python 3 API
 have_libpy3=no
-if test "x$enable_py3integration" != xno; then
+if test "x$enable_py3integration" != xno && test x"$have_libpy" == xno; then
        case "$enable_py3integration" in
        yes|auto)
                XPATH="$PATH"
diff --git a/monetdb5/extras/pyapi/pyapi.c b/monetdb5/extras/pyapi/pyapi.c
--- a/monetdb5/extras/pyapi/pyapi.c
+++ b/monetdb5/extras/pyapi/pyapi.c
@@ -35,11 +35,7 @@
 #define PythonUnicodeType Py_UNICODE
 #endif
 
-#ifdef IS_PY3K
-static char* pyapi_enableflag = "embedded_py3";
-#else
 static char* pyapi_enableflag = "embedded_py";
-#endif
 const char* verbose_enableflag = "enable_pyverbose";
 const char* warning_enableflag = "enable_pywarnings";
 const char* debug_enableflag = "enable_pydebug";
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -315,6 +315,7 @@ CONDITIONALS = {
     'HAVE_LIBR'            : "@HAVE_LIBR_FALSE@",
     'HAVE_LIBPANDAS'       : "@HAVE_LIBPANDAS_FALSE@",
     'HAVE_LIBPY'           : "@HAVE_LIBPY_FALSE@",
+    'HAVE_LIBPY3'          : "@HAVE_LIBPY3_FALSE@",
     'HAVE_LIBXML'          : "@HAVE_LIBXML_FALSE@",
     'HAVE_LIBZ'            : "@HAVE_LIBZ_FALSE@",
     'HAVE_LIDAR'           : "@HAVE_LIDAR_FALSE@",
@@ -2799,7 +2800,7 @@ def DoIt(env, SERVER, CALL, TST, EXT, PR
                 Srvr.extend(['--set', 'embedded_r=yes'])
 
             # enable Python integration in server
-            if CONDITIONALS['HAVE_LIBPY']:
+            if CONDITIONALS['HAVE_LIBPY'] or CONDITIONALS['HAVE_LIBPY3']:
                 Srvr.extend(['--set', 'embedded_py=true'])
                 
             pSrvr, pSrvrTimer = LaunchIt(Srvr, 
'\nio.printf("\\nReady.\\n");\n', SrvrOut, SrvrErr, TIMEOUT)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to