<commit_before>#!/bin/bash

# this file is meant to be run inside the pypywheels docker image

#set -e -x
set -e

TARGET=$1
PYPY_VERSION=$2
PY_VERSION=$3
PKG=$4

TARGETDIR=/pypy-wheels/wheelhouse/$TARGET

if [[ "$PYPY_VERSION" = "2.7" ]]
then
    PYPY_NAME="pypy-$PYPY_VERSION"
else
    PYPY_NAME="pypy$PY-$PYPY_VERSION"
fi

PYPY=/opt/$PYPY_NAME*/bin/pypy
if [ -f $PYPY ]
then
    echo "FOUND PYPY: $PYPY"
else
    echo "ERROR: PYPY does not exists: $PYPY"
    exit 1
fi

# Compile the wheels, for all pypys found inside /opt/
echo "Compiling wheel for $PKG"
echo "TARGETDIR: $TARGETDIR"
echo
cd

# pip install using our own wheel repo: this ensures that we don't
# recompile a package if the wheel is already available.
EXTRA="--extra-index https://antocuni.github.io/pypy-wheels/$TARGET"
$PYPY -m pip wheel $EXTRA -w wheelhouse "$PKG"

# copy the wheels to the final directory
mkdir -p $TARGETDIR
cp wheelhouse/*.whl $TARGETDIR
echo "wheels copied:"
find $TARGETDIR -name '*.whl'

# Bundle external shared libraries into the wheels
#
# XXX: auditwheel repair doesn't work because of this bug:
# https://github.com/NixOS/patchelf/issues/128
# try again when it's fixed
# echo
# echo "Running audiwheel..."
# echo
# for whl in wheelhouse/*.whl; do
#     auditwheel repair --plat linux_x86_64  "$whl" -w $TARGETDIR
# done
<commit_msg>bah, it seems that to build scipy you need to have numpy installed first, else it just fails. Bad scipy<commit_after>#!/bin/bash

# this file is meant to be run inside the pypywheels docker image

#set -e -x
set -e

TARGET=$1
PYPY_VERSION=$2
PY_VERSION=$3
PKG=$4

TARGETDIR=/pypy-wheels/wheelhouse/$TARGET

if [[ "$PYPY_VERSION" = "2.7" ]]
then
    PYPY_NAME="pypy-$PYPY_VERSION"
else
    PYPY_NAME="pypy$PY-$PYPY_VERSION"
fi

PYPY=/opt/$PYPY_NAME*/bin/pypy
if [ -f $PYPY ]
then
    echo "FOUND PYPY: $PYPY"
else
    echo "ERROR: PYPY does not exists: $PYPY"
    exit 1
fi

# Compile the wheels, for all pypys found inside /opt/
echo "Compiling wheel for $PKG"
echo "TARGETDIR: $TARGETDIR"
echo
cd

# pip install using our own wheel repo: this ensures that we don't
# recompile a package if the wheel is already available.
EXTRA="--extra-index https://antocuni.github.io/pypy-wheels/$TARGET"

if [[ "$PKG" = "scipy" ]]
then
    # else scipy doesn't build :(
    $PYPY -m pip install $EXTRA numpy
fi

$PYPY -m pip wheel $EXTRA -w wheelhouse "$PKG"

# copy the wheels to the final directory
mkdir -p $TARGETDIR
cp wheelhouse/*.whl $TARGETDIR
echo "wheels copied:"
find $TARGETDIR -name '*.whl'

# Bundle external shared libraries into the wheels
#
# XXX: auditwheel repair doesn't work because of this bug:
# https://github.com/NixOS/patchelf/issues/128
# try again when it's fixed
# echo
# echo "Running audiwheel..."
# echo
# for whl in wheelhouse/*.whl; do
#     auditwheel repair --plat linux_x86_64  "$whl" -w $TARGETDIR
# done

{'fraction_non_alphanumeric': 0.11941340782122906, 'fraction_numerical': 0.009776536312849162, 'mean_word_length': 3.8559322033898304, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '2094449', 'n_tokens_mistral': 1085, 'n_tokens_neox': 1071, 'n_words': 356}