<commit_before>get_filename_component(COMPONENT ${CMAKE_CURRENT_LIST_DIR} NAME)

# find_package(pybind11 CONFIG REQUIRED)
find_package(Python COMPONENTS Interpreter Development REQUIRED)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/pybind11)

if(pybind11_FOUND)
    target_sources( ${COMPONENT} PRIVATE
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin_module.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pyinterpreter.cpp

        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/attach.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/colour.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/datalog.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/display.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/gl.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/gl_draw.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/glsl.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/glvbo.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/handler.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/image.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/image_view.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/opengl_render_state.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/params.cpp<commit_msg>Make python optional.<commit_after>get_filename_component(COMPONENT ${CMAKE_CURRENT_LIST_DIR} NAME)

# find_package(pybind11 CONFIG REQUIRED)
find_package(Python COMPONENTS Interpreter Development QUIET)
if(Python_FOUND)
    add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/pybind11)
endif()

if(Python_FOUND AND pybind11_FOUND)
    target_sources( ${COMPONENT} PRIVATE
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin_module.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pyinterpreter.cpp

        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/attach.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/colour.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/datalog.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/display.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/gl.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/gl_draw.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/glsl.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/glvbo.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/handler.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/image.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/image_view.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/opengl_render_state.cpp
        ${CMAKE_CURRENT_LIST_DIR}/src/pypangolin/params.cpp
{'fraction_non_alphanumeric': 0.10460921843687375, 'fraction_numerical': 0.004809619238476954, 'mean_word_length': 4.596412556053812, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2541786', 'n_tokens_mistral': 967, 'n_tokens_neox': 915, 'n_words': 67}