2016-10-09 22:20:38 +02:00
|
|
|
diff -u -r ../weechat-1.6/cmake/FindPython.cmake ./cmake/FindPython.cmake
|
|
|
|
--- ../weechat-1.6/cmake/FindPython.cmake 2016-10-02 03:35:04.000000000 -0400
|
|
|
|
+++ ./cmake/FindPython.cmake 2016-10-09 14:56:31.261168669 -0400
|
|
|
|
@@ -34,64 +34,11 @@
|
2016-05-03 11:31:22 +02:00
|
|
|
endif()
|
2016-01-03 14:17:32 +01:00
|
|
|
|
2016-10-09 22:20:38 +02:00
|
|
|
if(ENABLE_PYTHON3)
|
2016-01-03 14:17:32 +01:00
|
|
|
- find_program(PYTHON_EXECUTABLE
|
2016-10-09 22:20:38 +02:00
|
|
|
- NAMES python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python2.7 python2.6 python2.5 python
|
2016-01-03 14:17:32 +01:00
|
|
|
- PATHS /usr/bin /usr/local/bin /usr/pkg/bin
|
|
|
|
- )
|
|
|
|
-else()
|
|
|
|
- find_program(PYTHON_EXECUTABLE
|
|
|
|
- NAMES python2.7 python2.6 python2.5 python
|
|
|
|
- PATHS /usr/bin /usr/local/bin /usr/pkg/bin
|
|
|
|
- )
|
|
|
|
-endif()
|
|
|
|
-
|
|
|
|
-if(PYTHON_EXECUTABLE)
|
|
|
|
- execute_process(
|
|
|
|
- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils.sysconfig import *; sys.stdout.write(get_config_var('INCLUDEPY'))"
|
|
|
|
- OUTPUT_VARIABLE PYTHON_INC_DIR
|
|
|
|
- )
|
|
|
|
-
|
|
|
|
- execute_process(
|
|
|
|
- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils.sysconfig import *; sys.stdout.write(get_config_var('LIBPL'))"
|
|
|
|
- OUTPUT_VARIABLE PYTHON_POSSIBLE_LIB_PATH
|
|
|
|
- )
|
|
|
|
-
|
|
|
|
- execute_process(
|
2016-05-03 11:31:22 +02:00
|
|
|
- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils.sysconfig import *; sys.stdout.write(get_config_var('LIBS') + ' ' + get_config_var('LINKFORSHARED'))"
|
2016-01-03 14:17:32 +01:00
|
|
|
- OUTPUT_VARIABLE PYTHON_LFLAGS
|
|
|
|
- )
|
|
|
|
-
|
|
|
|
- find_path(PYTHON_INCLUDE_PATH
|
|
|
|
- NAMES Python.h
|
|
|
|
- HINTS ${PYTHON_INC_DIR}
|
|
|
|
- )
|
|
|
|
- if(ENABLE_PYTHON3)
|
|
|
|
- find_library(PYTHON_LIBRARY
|
2016-10-09 22:20:38 +02:00
|
|
|
- NAMES python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python2.7 python2.6 python2.5 python
|
2016-01-03 14:17:32 +01:00
|
|
|
- HINTS ${PYTHON_POSSIBLE_LIB_PATH}
|
|
|
|
- )
|
|
|
|
- else()
|
|
|
|
- find_library(PYTHON_LIBRARY
|
|
|
|
- NAMES python2.7 python2.6 python2.5 python
|
|
|
|
- HINTS ${PYTHON_POSSIBLE_LIB_PATH}
|
|
|
|
- )
|
|
|
|
- endif()
|
|
|
|
-
|
|
|
|
- if(PYTHON_LIBRARY AND PYTHON_INCLUDE_PATH)
|
|
|
|
- execute_process(
|
|
|
|
- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(sys.version[:3])"
|
|
|
|
- OUTPUT_VARIABLE PYTHON_VERSION
|
|
|
|
- )
|
|
|
|
- execute_process(
|
|
|
|
- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(str(sys.version_info < (2,5)))"
|
|
|
|
- OUTPUT_VARIABLE PYTHON_OLD_VERSION
|
|
|
|
- )
|
|
|
|
- if(${PYTHON_OLD_VERSION} STREQUAL "True")
|
|
|
|
- message("Python >= 2.5 is needed to build python plugin, version found: ${PYTHON_VERSION}")
|
|
|
|
- else()
|
|
|
|
- set(PYTHON_FOUND TRUE)
|
|
|
|
- endif()
|
|
|
|
- endif()
|
2016-10-09 22:20:38 +02:00
|
|
|
+ set(PYTHON_EXECUTABLE "@TERMUX_PREFIX@/bin/python")
|
2017-01-15 19:37:14 +01:00
|
|
|
+ set(PYTHON_INCLUDE_PATH "@TERMUX_PREFIX@/include/python3.6m")
|
2016-10-09 22:20:38 +02:00
|
|
|
+ set(PYTHON_LIBRARY "@TERMUX_PREFIX@/lib")
|
2017-01-15 19:37:14 +01:00
|
|
|
+ set(PYTHON_LFLAGS "-Xlinker -export-dynamic -lpython3.6m")
|
2016-10-09 22:20:38 +02:00
|
|
|
+ set(PYTHON_FOUND TRUE)
|
2016-01-03 14:17:32 +01:00
|
|
|
|
|
|
|
mark_as_advanced(
|
|
|
|
PYTHON_EXECUTABLE
|