<commit_before># ---------------------------------
# Finds Python
# Adds library to target
# Adds include path
# ---------------------------------
INCLUDE("FindPythonLibs")

IF(PYTHONLIBS_FOUND)
	MESSAGE(STATUS "  Found Python...")
	INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})

	FOREACH(PYTHON_LIB ${PYTHON_LIBRARIES})
		SET(PYTHON_LIB1 "PYTHON_LIB1-NOTFOUND")
		FIND_LIBRARY(PYTHON_LIB1 NAMES ${PYTHON_LIB} PATHS NO_DEFAULT_PATH)
		FIND_LIBRARY(PYTHON_LIB1 NAMES ${PYTHON_LIB} PATHS "/")
		IF(PYTHON_LIB1)
			MESSAGE(STATUS "    [  OK  ] Third party lib ${PYTHON_LIB1}")
			TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${PYTHON_LIB1})
		ELSE(PYTHON_LIB1)
			MESSAGE(STATUS "    [FAILED] Third party lib ${PYTHON_LIB}")
		ENDIF(PYTHON_LIB1)
	ENDFOREACH(PYTHON_LIB)

	ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyPython)
ELSE(PYTHONLIBS_FOUND)
	MESSAGE(STATUS "  FAILED to find Python")
ENDIF(PYTHONLIBS_FOUND)<commit_msg>cmake-modules *FindThirdPartyPython.cmake : windows compatibility.<commit_after># ---------------------------------
# Finds Python
# Adds library to target
# Adds include path
# ---------------------------------

IF(WIN32)
FIND_PATH(PATH_PYTHON include/Python.h PATHS $ENV{OV_DEP_PYTHON} $ENV{OpenViBE_dependencies} NO_DEFAULT_PATH)
	IF(PATH_PYTHON)
		MESSAGE(STATUS "  Found Python...")
		INCLUDE_DIRECTORIES(${PATH_PYTHON}/include)
		
		FILE(GLOB_RECURSE lib_files ${PATH_PYTHON}/libs/*.lib)
		
		FOREACH(PYTHON_LIB ${lib_files})
			MESSAGE(STATUS "    [  OK  ] Third party lib ${PYTHON_LIB}")
			TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${PYTHON_LIB})
		ENDFOREACH(PYTHON_LIB)

		ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyPython)
	ELSE(PATH_PYTHON)
		MESSAGE(STATUS "  FAILED to find Python")
	ENDIF(PATH_PYTHON)
ENDIF(WIN32)

IF(UNIX)
	INCLUDE("FindPythonLibs")
	IF(PYTHONLIBS_FOUND)
		MESSAGE(STATUS "  Found Python...")
		INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})

		FOREACH(PYTHON_LIB ${PYTHON_LIBRARIES})
			SET(PYTHON_LIB1 "PYTHON_LIB1-NOTFOUND")
			FIND_LIBRARY(PYTHON_LIB1 NAMES ${PYTHON_LIB} PATHS NO_DEFAULT_PATH)
			FIND_LIBRARY(PYTHON_LIB1 NAMES ${PYTHON_LIB} PATHS "/")
			IF(PYTHON_LIB1)
				MESSAGE(STATUS "    [  OK  ] Third party lib ${PYTHON_LIB1}")
				TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${PYTHON_LIB1})
			ELSE(PYTHON_LIB1)
				MESSAGE(STATUS "    [FAILED] Third party lib ${PYTHON_LIB}")
			ENDIF(PYTHON_LIB1)
		ENDFOREACH(PYTHON_LIB)

		ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyPython)
	ELSE(PYTHONLIBS_FOUND)
		MESSAGE(STATUS "  FAILED to find Python")	
	ENDIF(PYTHONLIBS_FOUND)
ENDIF(UNIX)
{'fraction_non_alphanumeric': 0.15913555992141454, 'fraction_numerical': 0.008644400785854617, 'mean_word_length': 4.315240083507307, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4731693', 'n_tokens_mistral': 1103, 'n_tokens_neox': 983, 'n_words': 149}