boot
This commit is contained in:
@@ -29,9 +29,9 @@ target_link_libraries(Py4YAP libYap ${PYTHON_LIBRARIES})
|
||||
|
||||
|
||||
install(TARGETS Py4YAP
|
||||
RUNTIME DESTINATION ${bindir}
|
||||
LIBRARY DESTINATION ${libdir}
|
||||
ARCHIVE DESTINATION ${libdir}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
|
||||
|
||||
@@ -54,6 +54,6 @@ add_to_group( PYTHON_PL pl_library )
|
||||
set_target_properties (YAPPython PROPERTIES PREFIX "")
|
||||
|
||||
install(TARGETS YAPPython
|
||||
LIBRARY DESTINATION ${dlls}
|
||||
RUNTIME DESTINATION ${dlls}
|
||||
ARCHIVE DESTINATION ${dlls} )
|
||||
LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR}
|
||||
RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR}
|
||||
ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} )
|
||||
|
@@ -27,7 +27,7 @@ PyObject *py_ModDict;
|
||||
|
||||
VFS_t pystream;
|
||||
|
||||
static void *py_open(const char *name, const char *io_mode) {
|
||||
static void *py_open(VFS_t *me, int sno, const char *name, const char *io_mode) {
|
||||
#if HAVE_STRCASESTR
|
||||
if (strcasestr(name, "//python/") == name)
|
||||
name += strlen("//python/");
|
||||
@@ -35,12 +35,16 @@ static void *py_open(const char *name, const char *io_mode) {
|
||||
if (strstr(name, "//python/") == name)
|
||||
name += strlen("//python/");
|
||||
#endif
|
||||
StreamDesc *st = YAP_RepStreamFromId(sno);
|
||||
// we assume object is already open, so there is no need to open it.
|
||||
PyObject *stream = string_to_python(name, true, NULL);
|
||||
if (stream == Py_None)
|
||||
return NULL;
|
||||
Py_INCREF(stream);
|
||||
return stream;
|
||||
st->vfs_handle = stream;
|
||||
st->vfs = me;
|
||||
st->status = Append_Stream_f | Output_Stream_f;
|
||||
return stream;
|
||||
}
|
||||
|
||||
static bool py_close(int sno) {
|
||||
|
@@ -71,7 +71,7 @@ endif()
|
||||
|
||||
install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip install --ignore-installed .
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})"
|
||||
DEPENDS Py4YAP ${CMAKE_BINARY_DIR}/${YAP_STARTUP} ${dlls} )
|
||||
DEPENDS Py4YAP ${CMAKE_BINARY_DIR}/${YAP_STARTUP} ${YAP_INSTALL_DLLDIR} )
|
||||
|
||||
|
||||
install(FILES ${YAP4PY_PL} DESTINATION ${libpl} )
|
||||
|
@@ -81,9 +81,9 @@ extensions=[Extension('_yap', native_sources,
|
||||
('MINOR_VERSION', '0'),
|
||||
('_YAP_NOT_INSTALLED_', '1'),
|
||||
('YAP_PYTHON', '1')],
|
||||
runtime_library_dirs=['yap4py','${RCMAKE_INSTALL_LIBDIR}','${CMAKE_INSTALL_BINDIR}'],
|
||||
runtime_library_dirs=['yap4py','${RCMAKE_INSTALL_FULL_LIBDIR}','${CMAKE_INSTALL_FULL_BINDIR}'],
|
||||
swig_opts=['-modern', '-c++', '-py3','-I${RELATIVE_SOURCE}/CXX'],
|
||||
library_dirs=['../../..','../../../CXX','../../packages/python',"${dlls}","${CMAKE_INSTALL_BINDIR}", '.'],
|
||||
library_dirs=['../../..','../../../CXX','../../packages/python',"${YAP_INSTALL_FULL_DLLDIR}","${CMAKE_INSTALL_FULL_BINDIR}", '.'],
|
||||
extra_link_args=my_extra_link_args,
|
||||
extra_compile_args=['-g3','-O0'],
|
||||
libraries=['Yap','${GMP_LIBRARIES}'],
|
||||
|
Reference in New Issue
Block a user