diff --git a/src/apps/queuetool/CMakeLists.txt b/src/apps/queuetool/CMakeLists.txt index d68144a..71cb14c 100644 --- a/src/apps/queuetool/CMakeLists.txt +++ b/src/apps/queuetool/CMakeLists.txt @@ -1 +1,2 @@ -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bongo-queuetool DESTINATION ${SBIN_INSTALL_DIR}) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/bongo-queuetool ${CMAKE_CURRENT_BINARY_DIR}/bongo-queuetool) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bongo-queuetool DESTINATION ${SBIN_INSTALL_DIR} PERMISSIONS WORLD_EXECUTE) diff --git a/src/apps/queuetool/bongo-queuetool b/src/apps/queuetool/bongo-queuetool index b292d3e..5be59fe 100755 --- a/src/apps/queuetool/bongo-queuetool +++ b/src/apps/queuetool/bongo-queuetool @@ -3,14 +3,16 @@ import logging, os, pwd, sys # add the development directories or the current prefix to PYTHONPATH -binpath = os.path.abspath(os.path.dirname(sys.argv[0])) -if binpath.endswith("bin"): - from distutils import sysconfig - path = [sysconfig.get_python_lib(0,0,prefix=os.path.abspath(binpath+"/.."))] -else: - path = [os.path.abspath("/".join((binpath, "../../libs/python"))), binpath] -for p in path: - if path not in sys.path: sys.path.insert(0, p) +sys.path.insert(0, "${PYTHON_SITEPACKAGES_PATH}") + +#binpath = os.path.abspath(os.path.dirname(sys.argv[0])) +#if binpath.endswith("bin"): +# from distutils import sysconfig +# path = [sysconfig.get_python_lib(0,0,prefix=os.path.abspath(binpath+"/.."))] +#else: +# path = [os.path.abspath("/".join((binpath, "../../libs/python"))), binpath] +#for p in path: +# if path not in sys.path: sys.path.insert(0, p) from bongo.cmdparse import CommandParser, Command from bongo.store.QueueClient import QueueClient diff --git a/src/libs/python/libbongo/CMakeLists.txt b/src/libs/python/libbongo/CMakeLists.txt index dfbe23c..6101bd3 100644 --- a/src/libs/python/libbongo/CMakeLists.txt +++ b/src/libs/python/libbongo/CMakeLists.txt @@ -2,7 +2,7 @@ include_directories(AFTER ${PYTHON_INCLUDE_PATH}) python_add_module(libs cal.c - calcmd.c + #calcmd.c libs.c msgapi.c msgapi-defs.c @@ -40,3 +40,4 @@ target_link_libraries(bootstrap ) install(TARGETS libs bootstrap DESTINATION ${PYTHON_SITEPACKAGES_PATH}/libbongo/) +install(FILES __init__.py __init__.pyc DESTINATION ${PYTHON_SITEPACKAGES_PATH}/libbongo/) diff --git a/src/libs/python/libbongo/libs.c b/src/libs/python/libbongo/libs.c index 37d37fe..3b18513 100644 --- a/src/libs/python/libbongo/libs.c +++ b/src/libs/python/libbongo/libs.c @@ -38,8 +38,11 @@ extern "C" { static PyMethodDef ModuleMethods[] = { {NULL} }; /* Pull in the methods from the bindings */ +#if 0 +// we don't yet build calcmd extern PyMethodDef CalCmdMethods[]; extern EnumItemDef CalCmdEnums[]; +#endif extern PyMethodDef CalMethods[]; extern PyMethodDef MdbMethods[]; extern EnumItemDef MdbEnums[]; @@ -56,12 +59,6 @@ initlibs() char dbfdir[PATH_MAX]; /* Initialize the various bongo libraries */ - if (!MemoryManagerOpen((unsigned char*)"pybongo")) { - PyErr_SetString(PyExc_ImportError, - "bongo.libs error: MemoryManagerOpen() failed"); - return; - } - if (!ConnStartup(DEFAULT_CONNECTION_TIMEOUT)) { PyErr_SetString(PyExc_ImportError, "bongo.libs error: ConnStartup() failed"); @@ -99,7 +96,7 @@ initlibs() /* Add the Bongo libs */ AddLibrary(module, "cal", CalMethods, NULL); - AddLibrary(module, "calcmd", CalCmdMethods, CalCmdEnums); + //AddLibrary(module, "calcmd", CalCmdMethods, CalCmdEnums); AddLibrary(module, "msgapi", MsgApiMethods, NULL); AddLibrary(module, "streamio", StreamIOMethods, NULL); AddLibrary(module, "bongojson", BongoJsonMethods, NULL);