<commit_before>#!/bin/bash

BINDIR=`readlink -e $1`

source $BINDIR/bin/activate

# install latest versions of needed packages
pip install tornado -U
pip install requests -U
pip install BeautifulSoup4 -U
pip install selenium -U
pip install pytz -U
pip install itsdangerous -U
pip install geoip2 -U
pip install py2-ipaddress -U


# # install pysqlite
# cd sqlite-3.21.0

# CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA \
# -DSQLITE_ENABLE_DBSTAT_VTAB \
# -DSQLITE_ENABLE_FTS3 \
# -DSQLITE_ENABLE_FTS3_PARENTHESIS \
# -DSQLITE_ENABLE_FTS4 \
# -DSQLITE_ENABLE_FTS5 \
# -DSQLITE_ENABLE_JSON1 \
# -DSQLITE_ENABLE_STAT4 \
# -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
# -DSQLITE_SECURE_DELETE \
# -DSQLITE_SOUNDEX \
# -DSQLITE_TEMP_STORE=3 \
# -O2 \
# -fPIC" LIBS="-lm" ./configure --prefix=$BINDIR --enable-static --enable-shared

# cd -

cd pysqlite

CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_ENABLE_FTS3 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_FTS4 \
-DSQLITE_ENABLE_FTS5 \
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_ENABLE_STAT4 \
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
-DSQLITE_SECURE_DELETE \
-DSQLITE_SOUNDEX \
-DSQLITE_TEMP_STORE=3 \
-O2 \
-fPIC" LIBS="-lm" python setup.py build_static
python setup.py install

cd -

deactivate<commit_msg>trying to get self-contained pysqlite working<commit_after>#!/bin/bash

BINDIR=`readlink -e $1`

source $BINDIR/bin/activate

# install latest versions of needed packages
pip install tornado -U
pip install requests -U
pip install BeautifulSoup4 -U
pip install selenium -U
pip install pytz -U
pip install itsdangerous -U
pip install geoip2 -U
pip install py2-ipaddress -U


# # install pysqlite
# cd sqlite-3.21.0

# CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA \
# -DSQLITE_ENABLE_DBSTAT_VTAB \
# -DSQLITE_ENABLE_FTS3 \
# -DSQLITE_ENABLE_FTS3_PARENTHESIS \
# -DSQLITE_ENABLE_FTS4 \
# -DSQLITE_ENABLE_FTS5 \
# -DSQLITE_ENABLE_JSON1 \
# -DSQLITE_ENABLE_STAT4 \
# -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
# -DSQLITE_SECURE_DELETE \
# -DSQLITE_SOUNDEX \
# -DSQLITE_TEMP_STORE=3 \
# -O2 \
# -fPIC" LIBS="-lm" ./configure --prefix=$BINDIR --enable-static --enable-shared

# cd -

cd pysqlite

CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_ENABLE_FTS3 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_FTS4 \
-DSQLITE_ENABLE_FTS5 \
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_ENABLE_STAT4 \
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
-DSQLITE_SECURE_DELETE \
-DSQLITE_SOUNDEX \
-DSQLITE_TEMP_STORE=3 \
-O2 \
-fPIC" LIBS="-lm" python setup.py build_static

python setup.py install

cd -

deactivate
{'fraction_non_alphanumeric': 0.1029126213592233, 'fraction_numerical': 0.018640776699029128, 'mean_word_length': 4.344398340248962, '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': '3184248', 'n_tokens_mistral': 1124, 'n_tokens_neox': 1090, 'n_words': 190}