Changeset: e2b684efe3a7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e2b684efe3a7
Modified Files:
monetdb5/extras/pyapi/pyapi.c
tools/embeddedpy/Makefile.ag
tools/embeddedpy/setup.py
Branch: pyapi
Log Message:
Fixed some linking/compilation issues in MonetDBLite.
diffs (45 lines):
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
@@ -1165,6 +1165,14 @@ str
char* iar = NULL;
import_array1(iar);
pyapiInitialized++;
+ marshal_module = PyImport_Import(PyString_FromString("marshal"));
+ if (marshal_module == NULL) {
+ return createException(MAL, "pyapi.eval", "Failed to load Marshal
module.");
+ }
+ marshal_loads = PyObject_GetAttrString(marshal_module, "loads");
+ if (marshal_loads == NULL) {
+ return createException(MAL, "pyapi.eval", "Failed to load function
\"loads\" from Marshal module.");
+ }
}
#endif
#ifdef _PYAPI_VERBOSE_
diff --git a/tools/embeddedpy/Makefile.ag b/tools/embeddedpy/Makefile.ag
--- a/tools/embeddedpy/Makefile.ag
+++ b/tools/embeddedpy/Makefile.ag
@@ -39,8 +39,6 @@ lib_pyembedded = {
VERSION = 1
LIBS = ../../monetdb5/tools/libmonetdb5 \
../../gdk/libbat \
- ../../sql/backends/monet5/lib_sql \
- ../../monetdb5/extras/pyapi/lib_pyapi \
$(pcre_LIBS) $(PSAPILIB) \
$(SOCKET_LIBS) $(MALLOC_LIBS) $(DL_LIBS) $(PTHREAD_LIBS)
}
diff --git a/tools/embeddedpy/setup.py b/tools/embeddedpy/setup.py
--- a/tools/embeddedpy/setup.py
+++ b/tools/embeddedpy/setup.py
@@ -63,8 +63,9 @@ setup(
name=package_name,
sources=['embedded_module.c'],
depends=['embeddedpy.h'],
- library_dirs=[os.path.join(output_directory, 'lib')],
+ libraries=['_sql', '_pyapi'],
+ library_dirs=[os.path.join(output_directory, 'lib'),
os.path.join(output_directory, 'lib/monetdb5')],
include_dirs=[os.path.join(base_dir, x) for x in subdirs],
extra_objects = [os.path.join(output_directory,
'lib/libpyembedded.so')],
- runtime_library_dirs=[os.path.join(output_directory, 'lib/')])])
+ runtime_library_dirs=[os.path.join(output_directory, 'lib/'),
os.path.join(output_directory, 'lib/monetdb5')])])
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list