<commit_before># -*- sh-mode -*
# This should be sourced, not called.
set -e

# Directories.
root_dir=`pwd`

if [ -d debian ]; then
    build_dir="/tmp/_travis/build"
    install_dir="/tmp/_travis/install"
else
    build_dir="$root_dir/_travis/build"
    install_dir="$root_dir/_travis/install"
fi

echo "root_dir: " $root_dir
echo "build_dir: " $build_dir
echo "install_dir: " $install_dir


# Shortcuts.
git_clone="git clone --quiet --recursive"

# Setup environment variables.
export LD_LIBRARY_PATH="$install_dir/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="$install_dir/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`:$LD_LIBRARY_PATH"
export LTDL_LIBRARY_PATH="$install_dir/lib:$LTDL_LIBRARY_PATH"
export LTDL_LIBRARY_PATH="$install_dir/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`:$LTDL_LIBRARY_PATH"
export PKG_CONFIG_PATH="$install_dir/lib/pkgconfig:$PKG_CONFIG_PATH"
export PKG_CONFIG_PATH="$install_dir/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/pkgconfig:$PKG_CONFIG_PATH"

# Make cmake verbose.
export CMAKE_VERBOSE_MAKEFILE=1
export CTEST_OUTPUT_ON_FAILURE=1

# Create layout.
mkdir -p "$build_dir"
mkdir -p "$install_dir"<commit_msg>Update PYTHONPATH with adequate site-packages directory.<commit_after># -*- sh-mode -*
# This should be sourced, not called.
set -e

# Directories.
root_dir=`pwd`

if [ -d debian ]; then
    build_dir="/tmp/_travis/build"
    install_dir="/tmp/_travis/install"
else
    build_dir="$root_dir/_travis/build"
    install_dir="$root_dir/_travis/install"
fi

echo "root_dir: " $root_dir
echo "build_dir: " $build_dir
echo "install_dir: " $install_dir


# Shortcuts.
git_clone="git clone --quiet --recursive"

# Setup environment variables.
export LD_LIBRARY_PATH="$install_dir/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="$install_dir/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`:$LD_LIBRARY_PATH"
export LTDL_LIBRARY_PATH="$install_dir/lib:$LTDL_LIBRARY_PATH"
export LTDL_LIBRARY_PATH="$install_dir/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`:$LTDL_LIBRARY_PATH"
export PKG_CONFIG_PATH="$install_dir/lib/pkgconfig:$PKG_CONFIG_PATH"
export PKG_CONFIG_PATH="$install_dir/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/pkgconfig:$PKG_CONFIG_PATH"

if type "python" > /dev/null; then
    pythonsite_dir=`python -c "import sys, os; print os.sep.join(['lib', 'python' + sys.version[:3], 'site-packages'])"`
    export PYTHONPATH="$install_dir/$pythonsite_dir:$PYTHONPATH"
fi

# Make cmake verbose.
export CMAKE_VERBOSE_MAKEFILE=1
export CTEST_OUTPUT_ON_FAILURE=1

# Create layout.
mkdir -p "$build_dir"
mkdir -p "$install_dir"
{'fraction_non_alphanumeric': 0.12840466926070038, 'fraction_numerical': 0.0019455252918287938, 'mean_word_length': 6.452173913043478, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '4116489', 'n_tokens_mistral': 1020, 'n_tokens_neox': 961, 'n_words': 160}