This commit is contained in:
Vitor Santos Costa
2016-08-22 04:01:38 +01:00
parent e50d722e66
commit ba730273e7
7 changed files with 86 additions and 59 deletions

View File

@@ -12,7 +12,7 @@ add_library (libpython SHARED ${PYTHON_SOURCES})
set (PYTHON_HEADERS
python.h)
# configure_file ("setup.py.cmake" "setup.py" )
configure_file ("setup.py.cmake" "setup.py" )
target_link_libraries(libpython libYap ${PYTHON_LIBRARIES})
@@ -38,6 +38,12 @@ add_custom_target ( YAPex ALL
install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} install -f
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
find_python_module( jupyter )
if (PY_JUPYTER)
add_subdirectory(yap_kernel)
endif()
endif (PYTHONLIBS_FOUND)

View File

@@ -951,13 +951,15 @@ PyObject *compound_to_pytree(term_t t, functor_t fun) {
// this should never happen
return term_to_python( t, false);
} else {
#if PY_MAJOR_VERSION >= 3
const char *s;
if (!(s = PL_atom_chars(name)))
return NULL;
#if PY_MAJOR_VERSION >= 3
return term_to_nametuple(s, arity, t);
#else
PyObject *c, *o1;
term_t tleft;
int i;
PyObject *c, *o1;
o = PyTuple_New(arity);
tleft = PL_new_term_ref();
for (i = 0; i < arity; i++) {

View File

@@ -1,5 +1,4 @@
from setuptools import setup, Extension
from distutils.core import setup
setup(
name = "yapex",