<commit_before># - Test if Python is embedable
# Facilitate python within paintown
#
#  PYTHON_EMBEDABLE - True if embedable

find_package(PythonLibs)
# Some systems require these libs to be explicitly be added for the test
find_library(DL dl)
find_library(MATH m)
find_library(PTHREAD pthread)
find_library(UTIL util)

if(PYTHONLIBS_FOUND)
	MESSAGE(STATUS "Checking if Python is Embedable")
	SET(CMAKE_REQUIRED_INCLUDES ${PYTHON_INCLUDE_PATH})
	# If on Slackware, uncomment the next line to fix a missing library issue
	# As of 11/22/2009 this is needed for Slackware 13
	# SET(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} -ldl -lm -lpthread -lutil)
	SET(CMAKE_REQUIRED_LIBRARIES ${PYTHON_LIBRARIES} ${DL} ${MATH} ${PTHREAD} ${UTIL})
	CHECK_C_SOURCE_COMPILES(<commit_msg>Updated python module correcting setting of libs<commit_after># - Test if Python is embedable
# Facilitate python within paintown
#
#  PYTHON_EMBEDABLE - True if embedable

find_package(PythonLibs)
# Some systems require these libs to be added explicitly
find_library(DL dl)
find_library(MATH m)
find_library(PTHREAD pthread)
find_library(UTIL util)

if(PYTHONLIBS_FOUND)
	MESSAGE(STATUS "Checking if Python is Embedable")
	SET(CMAKE_REQUIRED_INCLUDES ${PYTHON_INCLUDE_PATH})
	# ensure the libs are included with python
	SET(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} ${DL} ${MATH} ${PTHREAD} ${UTIL})
	SET(CMAKE_REQUIRED_LIBRARIES ${PYTHON_LIBRARIES})
	CHECK_C_SOURCE_COMPILES(
{'fraction_non_alphanumeric': 0.08286908077994429, 'fraction_numerical': 0.006963788300835654, 'mean_word_length': 6.684491978609626, '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': '4097221', 'n_tokens_mistral': 545, 'n_tokens_neox': 516, 'n_words': 142}