<commit_before>#!/bin/bash

echo "Building pyobjus ============================="

. $(dirname $0)/environment.sh

if [ ! -d $TMPROOT/pyobjus ] ; then
try pushd $TMPROOT
try git clone -b test_on_device <EMAIL>:ivpusic/pyobjus.git
try popd
fi

try pushd $TMPROOT/pyobjus

OLD_CC="$CC"
OLD_CFLAGS="$CFLAGS"
OLD_LDFLAGS="$LDFLAGS"
OLD_LDSHARED="$LDSHARED"
export CC="$ARM_CC -I$BUILDROOT/include -I$BUILDROOT/include/ffi"
export CFLAGS="$ARM_CFLAGS"
export LDFLAGS="$ARM_LDFLAGS"
export LDSHARED="$KIVYIOSROOT/tools/liblink"

rm -rdf iosbuild/
try mkdir iosbuild

try pushd $TMPROOT/pyobjus/pyobjus
find . -name *.pyx -exec $CYTHON {} \;
popd

try $HOSTPYTHON setup.py build_ext
try $HOSTPYTHON setup.py install -O2 --root iosbuild

# Strip away the large stuff
find iosbuild/ | grep -E '.*\.(py|pyc|so\.o|so\.a|so\.libs)$$' | xargs rm
rm -rdf "$BUILDROOT/python/lib/python2.7/site-packages/pyobjus"
try cp -R "iosbuild/usr/local/lib/python2.7/site-packages/pyobjus" "$BUILDROOT/python/lib/python2.7/site-packages"
popd

export CC="$OLD_CC"
export CFLAGS="$OLD_CFLAGS"
export LDFLAGS="$OLD_LDFLAGS"
export LDSHARED="$OLD_LDSHARED"

bd=$TMPROOT/pyobjus/build/lib.macosx-*/pyobjus
try $KIVYIOSROOT/tools/biglink $BUILDROOT/lib/libpyobjus.a $bd 
deduplicate $BUILDROOT/lib/libpyobjus.a
<commit_msg>pyobjus is getting code from ivpusic/master instead of ivpusic/test_on_device branch<commit_after>#!/bin/bash

echo "Building pyobjus ============================="

. $(dirname $0)/environment.sh

if [ ! -d $TMPROOT/pyobjus ] ; then
try pushd $TMPROOT
try git clone <EMAIL>:ivpusic/pyobjus.git
try popd
fi

try pushd $TMPROOT/pyobjus

OLD_CC="$CC"
OLD_CFLAGS="$CFLAGS"
OLD_LDFLAGS="$LDFLAGS"
OLD_LDSHARED="$LDSHARED"
export CC="$ARM_CC -I$BUILDROOT/include -I$BUILDROOT/include/ffi"
export CFLAGS="$ARM_CFLAGS"
export LDFLAGS="$ARM_LDFLAGS"
export LDSHARED="$KIVYIOSROOT/tools/liblink"

rm -rdf iosbuild/
try mkdir iosbuild

try pushd $TMPROOT/pyobjus/pyobjus
find . -name *.pyx -exec $CYTHON {} \;
popd

try $HOSTPYTHON setup.py build_ext
try $HOSTPYTHON setup.py install -O2 --root iosbuild

# Strip away the large stuff
find iosbuild/ | grep -E '.*\.(py|pyc|so\.o|so\.a|so\.libs)$$' | xargs rm
rm -rdf "$BUILDROOT/python/lib/python2.7/site-packages/pyobjus"
try cp -R "iosbuild/usr/local/lib/python2.7/site-packages/pyobjus" "$BUILDROOT/python/lib/python2.7/site-packages"
popd

export CC="$OLD_CC"
export CFLAGS="$OLD_CFLAGS"
export LDFLAGS="$OLD_LDFLAGS"
export LDSHARED="$OLD_LDSHARED"

bd=$TMPROOT/pyobjus/build/lib.macosx-*/pyobjus
try $KIVYIOSROOT/tools/biglink $BUILDROOT/lib/libpyobjus.a $bd 
deduplicate $BUILDROOT/lib/libpyobjus.a

{'fraction_non_alphanumeric': 0.16496018202502843, 'fraction_numerical': 0.006067500948047023, 'mean_word_length': 5.2959427207637235, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2062363', 'n_tokens_mistral': 1085, 'n_tokens_neox': 1106, 'n_words': 209}