<commit_before># OpenCMISS-Zinc Library
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

find_program(VIRTUALENV_EXEC virtualenv)
mark_as_advanced(VIRTUALENV_EXEC)

# Bindings options
set(OPENCMISS_LIBRARIES_VIRTUALENV_INSTALL_PREFIX "${OPENCMISS_LIBRARIES_VIRTUALENV_INSTALL_PREFIX}" CACHE PATH "Install prefix for the virtualenv Zinc library.")
if (OCL_VIRTUALENV_INSTALL_PREFIX)
    set(OPENCMISS_LIBRARIES_VIRTUALENV_INSTALL_PREFIX "${OCL_VIRTUALENV_INSTALL_PREFIX}" CACHE PATH "Install prefix for the virtualenv Zinc library." FORCE)
endif ()
set(ZINC_USE_VIRTUALENV TRUE CACHE BOOL "Install Zinc into virtual environment.")
if (OCL_USE_VIRTUALENV)
    set(ZINC_USE_VIRTUALENV ${OCL_USE_VIRTUALENV} CACHE BOOL "Install Zinc into virtual environment." FORCE)
endif ()
if (NOT ${VIRTUALENV_EXEC})
    set(ZINC_USE_VIRTUALENV FALSE CACHE BOOL "Install Zinc into virtual environment." FORCE)
    message(STATUS "The program virtualenv was not found disabling it's use.")
endif ()

# Create Python bindings for the Zinc library.

set(PYTHON_VERSION "" CACHE STRING "Identify your preferred version of Python to locate. [2.6, 2.7, 3.0, 3.3, ...]")

# SWIG has already been found at this point.
include(${SWIG_USE_FILE})

set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION})
# Force the finding of the python library always incase the desired PYTHON_VERSION has changed.
unset(PYTHONLIBS_FOUND CACHE)
# I hate this masking of variables
unset(PYTHON_LIBRARY CACHE)
unset(PYTHON_LIBRARY)
unset(PYTHON_DEBUG_LIBRARY CACHE)
unset(PYTHON_DEBUG_LIBRARY)
unset(PYTHON_INCLUDE_DIR CACHE)
unset(PYTHONINTERP_FOUND CACHE)
unset(PYTHON_EXECUTABLE CACHE)
unset(PYTHONLIBS_VERSION_STRING)
find_package(PythonInterp QUIET)
find_package(PythonLibs QUIET)<commit_msg>Use ZN_USE_VIRTUALENV for command line version of ZINC_USE_VIRTUALENV.<commit_after># OpenCMISS-Zinc Library
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

find_program(VIRTUALENV_EXEC virtualenv)
mark_as_advanced(VIRTUALENV_EXEC)

# Bindings options
set(OPENCMISS_LIBRARIES_VIRTUALENV_INSTALL_PREFIX "${OPENCMISS_LIBRARIES_VIRTUALENV_INSTALL_PREFIX}" CACHE PATH "Install prefix for the virtualenv Zinc library.")
if (OCL_VIRTUALENV_INSTALL_PREFIX)
    set(OPENCMISS_LIBRARIES_VIRTUALENV_INSTALL_PREFIX "${OCL_VIRTUALENV_INSTALL_PREFIX}" CACHE PATH "Install prefix for the virtualenv Zinc library." FORCE)
endif ()
set(ZINC_USE_VIRTUALENV TRUE CACHE BOOL "Install Zinc into virtual environment.")
if (DEFINED ZN_USE_VIRTUALENV)
    set(ZINC_USE_VIRTUALENV ${ZN_USE_VIRTUALENV} CACHE BOOL "Install Zinc into virtual environment." FORCE)
endif ()
if (NOT ${VIRTUALENV_EXEC})
    set(ZINC_USE_VIRTUALENV FALSE CACHE BOOL "Install Zinc into virtual environment." FORCE)
    message(STATUS "The program virtualenv was not found disabling it's use.")
endif ()

# Create Python bindings for the Zinc library.

set(PYTHON_VERSION "" CACHE STRING "Identify your preferred version of Python to locate. [2.6, 2.7, 3.0, 3.3, ...]")

# SWIG has already been found at this point.
include(${SWIG_USE_FILE})

set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION})
# Force the finding of the python library always incase the desired PYTHON_VERSION has changed.
unset(PYTHONLIBS_FOUND CACHE)
# I hate this masking of variables
unset(PYTHON_LIBRARY CACHE)
unset(PYTHON_LIBRARY)
unset(PYTHON_DEBUG_LIBRARY CACHE)
unset(PYTHON_DEBUG_LIBRARY)
unset(PYTHON_INCLUDE_DIR CACHE)
unset(PYTHONINTERP_FOUND CACHE)
unset(PYTHON_EXECUTABLE CACHE)
unset(PYTHONLIBS_VERSION_STRING)
find_package(PythonInterp QUIET)
find_package(PythonLibs QUIET)
{'fraction_non_alphanumeric': 0.07588707588707588, 'fraction_numerical': 0.006216006216006216, 'mean_word_length': 6.572549019607843, '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': '7532558', 'n_tokens_mistral': 1436, 'n_tokens_neox': 1322, 'n_words': 379}