diff --git a/build_all.sh b/docker_build_all.sh similarity index 83% rename from build_all.sh rename to docker_build_all.sh index 9d8dee2..f909144 100755 --- a/build_all.sh +++ b/docker_build_all.sh @@ -1,41 +1,39 @@ #!/usr/bin/env bash set -u -x -e cd /app/tamaas printf 'build_static_lib="True"\nbackend="cpp"\nverbose="true"\nstrip_info="true"\n' > build-setup.conf for PYROOT in /opt/python/*; do MAJOR=$($PYROOT/bin/python --version 2>&1 | cut -d " " -f 2 | cut -d . -f 1) MINOR=$($PYROOT/bin/python --version 2>&1 | cut -d " " -f 2 | cut -d . -f 2) - # Skip 3.9 for now - [ $MINOR -ge 9 ] && continue - # Avoid cp27mu - (basename $PYROOT | grep -Eq 'mu') && continue + # Skip Python 2 + [ $MAJOR -eq 2 ] && continue # Compile - scons -j4 py_exec="$PYROOT/bin/python$MAJOR" | tee compile.log + scons -j4 py_exec="$PYROOT/bin/python$MAJOR" backend=cpp fftw_threads=none | tee compile.log # Link fftw statically grep 'build-release/python/tamaas/_tamaas' compile.log \ | sed -e 's/lfftw3/l:libfftw3.a/' \ | bash TAG=$(basename $PYROOT | cut -d "-" -f 1) # Create wheel pushd build-release/python $PYROOT/bin/python setup.py bdist_wheel \ --python-tag $TAG \ --plat-name manylinux2010_x86_64 \ -d /dist/wheels/ popd rm -rf build-release/python done for wheel in /dist/wheels/*.whl; do auditwheel repair $wheel -w /dist/wheelhouse done diff --git a/run.sh b/generate_wheels.sh similarity index 64% rename from run.sh rename to generate_wheels.sh index 62adaa8..fb84db5 100755 --- a/run.sh +++ b/generate_wheels.sh @@ -1,16 +1,21 @@ #!/usr/bin/bash +if [ $# -ne 1 ]; then + echo "usage: ./run.sh tag|branch" + exit 1 +fi + sudo rm -rf tamaas dist/* mkdir dist/wheelhouse -git clone https://c4science.ch/source/tamaas.git tamaas +git clone --depth 1 --branch $1 https://c4science.ch/source/tamaas.git tamaas pushd tamaas git submodule update --init third-party/pybind11 third-party/expolit popd sudo docker run --rm \ -v $PWD/tamaas:/app/tamaas \ -v $PWD:/app/build \ -v $PWD/dist:/dist \ -t tamaas_manylinux \ - /app/build/build_all.sh + /app/build/docker_build_all.sh