<commit_before>#/usr/bin/env bash

set -ex 

#conda install -c conda-forge numpy

#PYTHON_EXECUTABLE=/opt/conda/bin/python
#PYTHON_LIBRARY=/opt/conda/bin/libpython3.6m.so
#PYTHON_INCLUDE_DIR=/opt/conda/include/python3.6m/

function PushCMakeOption {
        if [ -n "$2" ] ; then
                cmake_opts+=" -D$1=$2"
        fi
}

CMAKE_BUILD_TYPE=RelWithDebInfo 
BUILD_DIR=${BUILD_DIR:-$(pwd)/build/manylinux} 

SOURCE_DIR=$(pwd)
mkdir -p $BUILD_DIR
cd $BUILD_DIR

cmake_opts=""
#PushCMakeOption PYTHON_VERSION         ${PYTHON_VERSION}
PushCMakeOption CMAKE_BUILD_TYPE       ${CMAKE_BUILD_TYPE}
PushCMakeOption VISUS_INTERNAL_DEFAULT 0
PushCMakeOption VISUS_INTERNAL_ZLIB    1
PushCMakeOption VISUS_INTERNAL_LZ4     1
PushCMakeOption VISUS_INTERNAL_TINYXML 1
PushCMakeOption VISUS_INTERNAL_FREEIMAGE 1
PushCMakeOption VISUS_INTERNAL_OPENSSL 1
PushCMakeOption DISABLE_OPENMP         1
PushCMakeOption VISUS_GUI              0
#PushCMakeOption OPENSSL_ROOT_DIR       ${OPENSSL_ROOT_DIR}
#PushCMakeOption PYTHON_EXECUTABLE      ${PYTHON_EXECUTABLE}
#PushCMakeOption PYTHON_INCLUDE_DIR     ${PYTHON_INCLUDE_DIR}
#PushCMakeOption PYTHON_LIBRARY         ${PYTHON_LIBRARY}
#PushCMakeOption PYTHON_PLAT_NAME       manylinux1_x86_64
#PushCMakeOption PYPI_USERNAME          ${PYPI_USERNAME}
#PushCMakeOption PYPI_PASSWORD          ${<PASSWORD>}
#PushCMakeOption NUMPY_INCLUDE_DIR      /opt/conda/lib/python3.6/site-packages/numpy/core/include

#${PYTHON_EXECUTABLE} -c "import numpy; print(numpy.__file__)"

cmake ${cmake_opts} ${SOURCE_DIR} 
cmake --build . --target all -- -j 4
cmake --build . --target test

cmake --build . --target install 
<commit_msg>builds locally, no test yet<commit_after>#/usr/bin/env bash

set -ex 

#conda install -c conda-forge numpy

PYTHON_EXECUTABLE=$PYTHON
#/opt/conda/bin/python
#PYTHON_LIBRARY=/opt/conda/bin/libpython3.6m.so
#PYTHON_INCLUDE_DIR=/opt/conda/include/python3.6m/

function PushCMakeOption {
        if [ -n "$2" ] ; then
                cmake_opts+=" -D$1=$2"
        fi
}

CMAKE_BUILD_TYPE=RelWithDebInfo 
BUILD_DIR=${BUILD_DIR:-$(pwd)/build} 

SOURCE_DIR=$(pwd)
mkdir -p $BUILD_DIR
cd $BUILD_DIR

cmake_opts=""
#PushCMakeOption PYTHON_VERSION         ${PYTHON_VERSION}
PushCMakeOption CMAKE_BUILD_TYPE       ${CMAKE_BUILD_TYPE}
PushCMakeOption VISUS_INTERNAL_DEFAULT 0
PushCMakeOption VISUS_INTERNAL_ZLIB    1
PushCMakeOption VISUS_INTERNAL_LZ4     1
PushCMakeOption VISUS_INTERNAL_TINYXML 1
PushCMakeOption VISUS_INTERNAL_FREEIMAGE 1
PushCMakeOption VISUS_INTERNAL_OPENSSL 1
PushCMakeOption DISABLE_OPENMP         1
PushCMakeOption VISUS_GUI              0
PushCMakeOption CMAKE_INSTALL_PREFIX   $PREFIX
#PushCMakeOption OPENSSL_ROOT_DIR       ${OPENSSL_ROOT_DIR}
#PushCMakeOption PYTHON_EXECUTABLE      ${PYTHON_EXECUTABLE}
#PushCMakeOption PYTHON_INCLUDE_DIR     ${PYTHON_INCLUDE_DIR}
#PushCMakeOption PYTHON_LIBRARY         ${PYTHON_LIBRARY}
#PushCMakeOption PYTHON_PLAT_NAME       manylinux1_x86_64
#PushCMakeOption PYPI_USERNAME          ${PYPI_USERNAME}
#PushCMakeOption PYPI_PASSWORD          ${<PASSWORD>}
#PushCMakeOption NUMPY_INCLUDE_DIR      /opt/conda/lib/python3.6/site-packages/numpy/core/include

#${PYTHON_EXECUTABLE} -c "import numpy; print(numpy.__file__)"

cmake ${cmake_opts} ${SOURCE_DIR} 
cmake --build . --target all -- -j 4
cmake --build . --target test

cmake --build . --target install 

#export MYPATH=$SRC_DIR/build/manylinux/install/

# here I was trying to test where the module is supposed to be deployed
#cd $PREFIX
#pwd
#$PYTHON -c "import OpenVisus"
{'fraction_non_alphanumeric': 0.09119229679977343, 'fraction_numerical': 0.013593882752761258, 'mean_word_length': 4.287425149700598, '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': '4708703', 'n_tokens_mistral': 1403, 'n_tokens_neox': 1337, 'n_words': 243}