Changeset: fa1957319525 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fa1957319525
Added Files:
monetdb5/extras/pyapi3/connection3.c
monetdb5/extras/pyapi3/formatinput3.c
monetdb5/extras/pyapi3/pyapi3.c
monetdb5/extras/pyapi3/pytypes3.c
monetdb5/extras/pyapi3/type_conversion3.c
monetdb5/extras/pyapi3/unicode3.c
Modified Files:
configure.ag
monetdb5/extras/pyapi3/Makefile.ag
Branch: python3udf
Log Message:
#include Python 2 UDF files to build Python 3 UDF files, instead of copying
them.
diffs (99 lines):
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2509,9 +2509,6 @@ if test "x$enable_py3integration" != xno
HAVEPYTHONHEADER=`$PYTHON_CMD -c "import distutils.sysconfig,
os; print(os.path.isfile(os.path.join(distutils.sysconfig.get_python_inc(),
'Python.h')))"`
if [test "x$HAVEPYTHONHEADER" = xTrue]; then
have_libpy3=yes
- # we can't have symlinks (because Windows) but we need
the files from /pyapi/ in the /pyapi3/ folder, so we just copy them
- cp monetdb5/extras/pyapi/*.c monetdb5/extras/pyapi3/
- cp monetdb5/extras/pyapi/*.h monetdb5/extras/pyapi3/
AC_DEFINE(HAVE_LIBPY3, 1, [Define if we can link to
python])
AC_SUBST(libpy3_CFLAGS, $libpy3_CFLAGS)
AC_SUBST(libpy3_LIBS, $libpy3_LIBS)
diff --git a/monetdb5/extras/pyapi3/Makefile.ag
b/monetdb5/extras/pyapi3/Makefile.ag
--- a/monetdb5/extras/pyapi3/Makefile.ag
+++ b/monetdb5/extras/pyapi3/Makefile.ag
@@ -17,6 +17,7 @@ INCLUDES = \
../../../sql/include \
../../../sql/server \
../../../sql/storage \
+ ../pyapi \
$(libpy3_CFLAGS)
@@ -25,7 +26,7 @@ MTSAFE
lib__pyapi3 = {
MODULE
DIR = libdir/monetdb5
- SOURCES = pyapi.c pyapi.h unicode.c unicode.h pytypes.c pytypes.h
type_conversion.c type_conversion.h formatinput.c formatinput.h connection.c
connection.h unspecified_evil.h
+ SOURCES = pyapi3.c unicode3.c pytypes3.c type_conversion3.c
formatinput3.c connection3.c
XDEPS = $(libpy3_LIBDEP)
LIBS = ../../tools/libmonetdb5 \
../../../gdk/libbat \
diff --git a/monetdb5/extras/pyapi3/connection3.c
b/monetdb5/extras/pyapi3/connection3.c
new file mode 100644
--- /dev/null
+++ b/monetdb5/extras/pyapi3/connection3.c
@@ -0,0 +1,6 @@
+
+/* Python 3 UDFs use the exact same source code as Python 2 UDFs */
+/* Except they are linked to a different library (Python 3/Python 2 libraries
respectively) */
+/* We simply include the source code from the Python 2 UDF directory */
+
+#include "connection.c"
diff --git a/monetdb5/extras/pyapi3/formatinput3.c
b/monetdb5/extras/pyapi3/formatinput3.c
new file mode 100644
--- /dev/null
+++ b/monetdb5/extras/pyapi3/formatinput3.c
@@ -0,0 +1,6 @@
+
+/* Python 3 UDFs use the exact same source code as Python 2 UDFs */
+/* Except they are linked to a different library (Python 3/Python 2 libraries
respectively) */
+/* We simply include the source code from the Python 2 UDF directory */
+
+#include "formatinput.c"
diff --git a/monetdb5/extras/pyapi3/pyapi3.c b/monetdb5/extras/pyapi3/pyapi3.c
new file mode 100644
--- /dev/null
+++ b/monetdb5/extras/pyapi3/pyapi3.c
@@ -0,0 +1,6 @@
+
+/* Python 3 UDFs use the exact same source code as Python 2 UDFs */
+/* Except they are linked to a different library (Python 3/Python 2 libraries
respectively) */
+/* We simply include the source code from the Python 2 UDF directory */
+
+#include "pyapi.c"
diff --git a/monetdb5/extras/pyapi3/pytypes3.c
b/monetdb5/extras/pyapi3/pytypes3.c
new file mode 100644
--- /dev/null
+++ b/monetdb5/extras/pyapi3/pytypes3.c
@@ -0,0 +1,6 @@
+
+/* Python 3 UDFs use the exact same source code as Python 2 UDFs */
+/* Except they are linked to a different library (Python 3/Python 2 libraries
respectively) */
+/* We simply include the source code from the Python 2 UDF directory */
+
+#include "pytypes.c"
diff --git a/monetdb5/extras/pyapi3/type_conversion3.c
b/monetdb5/extras/pyapi3/type_conversion3.c
new file mode 100644
--- /dev/null
+++ b/monetdb5/extras/pyapi3/type_conversion3.c
@@ -0,0 +1,6 @@
+
+/* Python 3 UDFs use the exact same source code as Python 2 UDFs */
+/* Except they are linked to a different library (Python 3/Python 2 libraries
respectively) */
+/* We simply include the source code from the Python 2 UDF directory */
+
+#include "type_conversion.c"
diff --git a/monetdb5/extras/pyapi3/unicode3.c
b/monetdb5/extras/pyapi3/unicode3.c
new file mode 100644
--- /dev/null
+++ b/monetdb5/extras/pyapi3/unicode3.c
@@ -0,0 +1,6 @@
+
+/* Python 3 UDFs use the exact same source code as Python 2 UDFs */
+/* Except they are linked to a different library (Python 3/Python 2 libraries
respectively) */
+/* We simply include the source code from the Python 2 UDF directory */
+
+#include "unicode.c"
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list