carry your own backall, and remove some debugging stuff

This commit is contained in:
Vítor Santos Costa 2018-03-20 00:57:27 +00:00
parent 98d52ba347
commit ff149367e8
5 changed files with 9 additions and 708 deletions

View File

@ -689,7 +689,11 @@ if (PYTHONLIBS_FOUND AND SWIG_FOUND)
find_python_module(wheel)
find_python_module(setuptools)
find_python_module(backcall)
if (PY_JUPYTER AND PY_WHEEL AND PY_SETUPTOOLS AND PY_BACKCALL)
if (NOT FOUND_BACKALL)
#bring your own
execute_process( COMMAND ${PYTHON_EXECUTABLE} -m pip install ${CMAKE_SOURCE_DIR}/misc/backcall-0.1.0-cp36-none-any.whl)
endif()
if (PY_JUPYTER AND PY_WHEEL AND PY_SETUPTOOLS)
add_subdirectory(packages/python/yap_kernel)
ENDIF ()

View File

@ -17,9 +17,7 @@ requirements:
- pkgconfig
- make
- libxml2
- backcall
run:
- backcall
- jupyterlab
- python
- readline

Binary file not shown.

View File

@ -89,8 +89,9 @@ static bool getLine(int inp) {
char *myrl_line = NULL;
StreamDesc *rl_instream = YAP_RepStreamFromId(inp);
term_t ctk = python_acquire_GIL();
fprintf(stderr,"in");
PyObject*prompt = PyUnicode_FromString( "?- "),
*msg = PyUnicode_FromString("");
*msg = PyUnicode_FromString(" **input** ");
/* window of vulnerability opened */
myrl_line = PyUnicode_AsUTF8(PyObject_CallFunctionObjArgs(rl_instream->u.private_data,msg,prompt,NULL));
python_release_GIL(ctk);

File diff suppressed because one or more lines are too long