<commit_before>#!/bin/sh
set -euo pipefail

if [ `uname` = "Darwin" ]; then
    # Use specified macOS SDK, and enforce minimum version
    export CXXFLAGS="$CXXFLAGS -isysroot $CONDA_BUILD_SYSROOT"
else
    # Remove after resolving https://github.com/pyre/pyre/issues/64
    export LDFLAGS="-lrt $LDFLAGS"
fi

mkdir build && cd build

# Compute sitepackage dir relative to install prefix
# Remove after backporting https://github.com/pyre/pyre/pull/60
relpath(){ $PYTHON -c "import os.path; print(os.path.relpath('$1','$2'))"; }
pypkgrel=$(relpath $SP_DIR $PREFIX)

# BUILD_TESTING=y enables pyre's test suite
# Remove after merging https://github.com/pyre/pyre/pull/60
cmake \
    -DBUILD_TESTING=y \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_LIBDIR=lib `# Override GNUInstallDirs - would be lib64` \
    -DCMAKE_INSTALL_PREFIX=$PREFIX \
    -DPYRE_DEST_PACKAGES=$pypkgrel \
    -DPython3_EXECUTABLE=$PYTHON `# Avoid using system python` \
    $SRC_DIR

cmake --build . --target install

# Disable TCP test on Docker<commit_msg>De-inline comments<commit_after>#!/bin/sh
set -euo pipefail

if [ `uname` = "Darwin" ]; then
    # Use specified macOS SDK, and enforce minimum version
    export CXXFLAGS="$CXXFLAGS -isysroot $CONDA_BUILD_SYSROOT"
else
    # Remove after resolving https://github.com/pyre/pyre/issues/64
    export LDFLAGS="-lrt $LDFLAGS"
fi

mkdir build && cd build

# Compute sitepackage dir relative to install prefix
# Remove after backporting https://github.com/pyre/pyre/pull/60
relpath(){ $PYTHON -c "import os.path; print(os.path.relpath('$1','$2'))"; }
pypkgrel=$(relpath $SP_DIR $PREFIX)

# BUILD_TESTING=y enables pyre's test suite
# Remove after merging https://github.com/pyre/pyre/pull/60
# Override LIBDIR from GNUInstallDirs - would be lib64 on centos
# Specify $PYTHON to avoid using system python
cmake \
    -DBUILD_TESTING=y \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_INSTALL_PREFIX=$PREFIX \
    -DPYRE_DEST_PACKAGES=$pypkgrel \
    -DPython3_EXECUTABLE=$PYTHON \
    $SRC_DIR

cmake --build . --target install

# Disable TCP test on Docker
{'fraction_non_alphanumeric': 0.11969839773798303, 'fraction_numerical': 0.010367577756833177, 'mean_word_length': 3.960280373831776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '5356935', 'n_tokens_mistral': 784, 'n_tokens_neox': 742, 'n_words': 183}