<commit_before>#!/bin/bash
# Script to install a specific version of Python from source using pyenv.
# This is meant to be run from inside the manylinux1 docker container.

set -ex

version=${PYENV_PYTHON_VERSION:-3.8.0}
multibuild_root=${MULTIBUILD_ROOT:-multibuild}

# install pyenv
if [ -z "$PYENV_ROOT" ]; then
	export PYENV_ROOT="$HOME/.pyenv"
	if [ ! -d "$PYENV_ROOT" ]; then
		git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
	fi
fi
if ! [ -x "$(command -v pyenv)" ]; then
	export PATH="$PYENV_ROOT/bin:$PATH"
	eval "$(pyenv init -)"
fi

# install python deps
yum install -y zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel tk-devel libffi-devel

# build openssl from source
source "${multibuild_root}/common_utils.sh"
source "${multibuild_root}/library_builders.sh"
build_openssl
# clean up build files
rm -rf archives arch_tmp openssl-*

# install python
pyenv install $version

# activate python
pyenv global $version
pyenv rehash
python --version
<commit_msg>pyenv_install_python.sh: do not exit early if error occurs<commit_after>#!/bin/bash
# Script to install a specific version of Python from source using pyenv.
# This is meant to be run from inside the manylinux1 docker container.

set -x

version=${PYENV_PYTHON_VERSION:-3.8.0}
multibuild_root=${MULTIBUILD_ROOT:-multibuild}

# install pyenv
if [ -z "$PYENV_ROOT" ]; then
	export PYENV_ROOT="$HOME/.pyenv"
	if [ ! -d "$PYENV_ROOT" ]; then
		git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
	fi
fi
if ! [ -x "$(command -v pyenv)" ]; then
	export PATH="$PYENV_ROOT/bin:$PATH"
	eval "$(pyenv init -)"
fi

# install python deps
yum install -y zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel tk-devel libffi-devel

# build openssl from source
source "${multibuild_root}/common_utils.sh"
source "${multibuild_root}/library_builders.sh"
build_openssl
# clean up build files
rm -rf archives arch_tmp openssl-*

# install python
pyenv install $version

# activate python
pyenv global $version
pyenv rehash
python --version

{'fraction_non_alphanumeric': 0.11500974658869395, 'fraction_numerical': 0.00682261208576998, 'mean_word_length': 4.624657534246575, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5364642', 'n_tokens_mistral': 736, 'n_tokens_neox': 697, 'n_words': 221}