<commit_before>#
# Copyright (c) 2013 <NAME> (<EMAIL>)
#
# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
# or copy at http://opensource.org/licenses/MIT)
#
IF(ENABLE_WIN_PYTHON_PKG)
    FILE(TO_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/damage_calculator.py" DAMAGE_CALCULATOR_PY)
    CONFIGURE_FILE(
        ${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in
        ${CMAKE_CURRENT_BINARY_DIR}/setup.py
    @ONLY)
    ADD_CUSTOM_COMMAND(
        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dist/damage_calculator.exe
        COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_BINARY_DIR}/lib/swig/python/pypkmnsim_swig.py ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/pypkmnsim_swig.py
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_BINARY_DIR}/lib/swig/python/${CMAKE_BUILD_TYPE}/_pypkmnsim_swig.pyd ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/_pypkmnsim_swig.pyd
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_SOURCE_DIR}/lib/swig/python/__init__.py ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/__init__.py
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_SOURCE_DIR}/lib/swig/python/Forms.py ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/Forms.py
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_SOURCE_DIR}/lib/swig/python/Games.py ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/Games.py
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_SOURCE_DIR}/lib/swig/python/Genders.py ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/Genders.py
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_SOURCE_DIR}/lib/swig/python/Move_Classes.py ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/Move_Classes.py
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_SOURCE_DIR}/lib/swig/python/Statuses.py ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/Statuses.py
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE}/pkmnsim.dll ${CMAKE_CURRENT_BINARY_DIR}/pkmnsim.dll
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_BINARY_DIR}/pokehack/lib/${CMAKE_BUILD_TYPE}/pokehack.dll ${CMAKE_CURRENT_BINARY_DIR}/pokehack.dll
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_BINARY_DIR}/pokelib/lib/${CMAKE_BUILD_TYPE}/pokelib.dll ${CMAKE_CURRENT_BINARY_DIR}/pokelib.dll
        COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/setup.py py2exe
        DEPENDS ${PYPKMNSIM_REAL_SWIG_NAME}
        COMMENT "Building standalone Python program for damage_calculator"
    )
    ADD_CUSTOM_TARGET(
        damage_calculator ALL
        DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dist/damage_calculator.exe
    )
    LIST(APPEND damage_calculator_outputs
        ${CMAKE_CURRENT_BINARY_DIR}/dist/_hashlib.pyd
        ${CMAKE_CURRENT_BINARY_DIR}/dist/bz2.pyd
        ${CMAKE_CURRENT_BINARY_DIR}/dist/damage_calculator.exe
        ${CMAKE_CURRENT_BINARY_DIR}/dist/library.zip
        ${CMAKE_CURRENT_BINARY_DIR}/dist/PyPKMNsim._pypkmnsim_swig.pyd
        ${CMAKE_CURRENT_BINARY_DIR}/dist/select.pyd
        ${CMAKE_CURRENT_BINARY_DIR}/dist/unicodedata.pyd
        ${CMAKE_CURRENT_BINARY_DIR}/dist/w9xpopen.exe
        ${CMAKE_CURRENT_BINARY_DIR}/dist/python27.dll
    )
    INSTALL(FILES ${damage_calculator_outputs} DESTINATION ${RUNTIME_DIR} COMPONENT Runtime)
    
    SET(APPS "\${CMAKE_INSTALL_PREFIX}/bin/damage_calculator.exe")
    INSTALL(CODE
        "INCLUDE(BundleUtilities)
        fixup_bundle(\"${APPS}\" \"\" \"\")"
    COMPONENT Runtime)<commit_msg>damage_calculator: CMake copies pkmds.dll before running py2exe<commit_after>#
# Copyright (c) 2013 <NAME> (<EMAIL>)
#
# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
# or copy at http://opensource.org/licenses/MIT)
#
IF(ENABLE_WIN_PYTHON_PKG)
    FILE(TO_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/damage_calculator.py" DAMAGE_CALCULATOR_PY)
    CONFIGURE_FILE(
        ${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in
        ${CMAKE_CURRENT_BINARY_DIR}/setup.py
    @ONLY)
    ADD_CUSTOM_COMMAND(
        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dist/damage_calculator.exe
        COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_BINARY_DIR}/lib/swig/python/pypkmnsim_swig.py ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/pypkmnsim_swig.py
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_BINARY_DIR}/lib/swig/python/${CMAKE_BUILD_TYPE}/_pypkmnsim_swig.pyd ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/_pypkmnsim_swig.pyd
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_SOURCE_DIR}/lib/swig/python/__init__.py ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/__init__.py
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_SOURCE_DIR}/lib/swig/python/Forms.py ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/Forms.py
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_SOURCE_DIR}/lib/swig/python/Games.py ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/Games.py
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_SOURCE_DIR}/lib/swig/python/Genders.py ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/Genders.py
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_SOURCE_DIR}/lib/swig/python/Move_Classes.py ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/Move_Classes.py
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_SOURCE_DIR}/lib/swig/python/Statuses.py ${CMAKE_CURRENT_BINARY_DIR}/PyPKMNsim/Statuses.py
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE}/pkmnsim.dll ${CMAKE_CURRENT_BINARY_DIR}/pkmnsim.dll
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_BINARY_DIR}/pokehack/lib/${CMAKE_BUILD_TYPE}/pokehack.dll ${CMAKE_CURRENT_BINARY_DIR}/pokehack.dll
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_BINARY_DIR}/pokelib/lib/${CMAKE_BUILD_TYPE}/pokelib.dll ${CMAKE_CURRENT_BINARY_DIR}/pokelib.dll
        COMMAND ${CMAKE_COMMAND} -E copy ${PKMNSIM_BINARY_DIR}/PKMDS-G5/lib/${CMAKE_BUILD_TYPE}/pkmds.dll ${CMAKE_CURRENT_BINARY_DIR}/pkmds.dll
        COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/setup.py py2exe
        DEPENDS ${PYPKMNSIM_REAL_SWIG_NAME}
        COMMENT "Building standalone Python program for damage_calculator"
    )
    ADD_CUSTOM_TARGET(
        damage_calculator ALL
        DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dist/damage_calculator.exe
    )
    LIST(APPEND damage_calculator_outputs
        ${CMAKE_CURRENT_BINARY_DIR}/dist/_hashlib.pyd
        ${CMAKE_CURRENT_BINARY_DIR}/dist/bz2.pyd
        ${CMAKE_CURRENT_BINARY_DIR}/dist/damage_calculator.exe
        ${CMAKE_CURRENT_BINARY_DIR}/dist/library.zip
        ${CMAKE_CURRENT_BINARY_DIR}/dist/PyPKMNsim._pypkmnsim_swig.pyd
        ${CMAKE_CURRENT_BINARY_DIR}/dist/select.pyd
        ${CMAKE_CURRENT_BINARY_DIR}/dist/unicodedata.pyd
        ${CMAKE_CURRENT_BINARY_DIR}/dist/w9xpopen.exe
        ${CMAKE_CURRENT_BINARY_DIR}/dist/python27.dll
    )
    INSTALL(FILES ${damage_calculator_outputs} DESTINATION ${RUNTIME_DIR} COMPONENT Runtime)
    
    SET(APPS "\${CMAKE_INSTALL_PREFIX}/bin/damage_calculator.exe")
    INSTALL(CODE
        "INCLUDE(BundleUtilities)
        fixup_bundle(\"${APPS}\" \"\" \"\")"
    COMPONENT Runtime)
{'fraction_non_alphanumeric': 0.11632886097630603, 'fraction_numerical': 0.0028546959748786756, 'mean_word_length': 4.556701030927835, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6530545', 'n_tokens_mistral': 2895, 'n_tokens_neox': 2678, 'n_words': 299}