From c40ef140b44468b9a996f83af2aad7045d4de650 Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.dos.anjos@gmail.com> Date: Sun, 21 Jan 2018 08:56:53 +0100 Subject: [PATCH] Make build work for non-python packages as well --- conda/conda-build.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/conda/conda-build.sh b/conda/conda-build.sh index c44ff3b..2e52869 100755 --- a/conda/conda-build.sh +++ b/conda/conda-build.sh @@ -2,8 +2,9 @@ if [ $# = 0 ]; then echo "Script wrapping conda-build to build Bob packages with defaults" - echo "usage: $0 <python-version> <recipe-dir>" - echo "example: $0 3.6 conda" + echo "usage: $0 <recipe-dir> [<python-version>]" + echo "example: $0 conda 3.6" + echo "example: $0 dependencies/libblitz" exit 1 fi @@ -11,9 +12,16 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" export CONDARC=${DIR}/build-condarc echo "Using CONDARC from \`${CONDARC}'..." -if [ -e ${2}/../version.txt ]; then - export BOB_PACKAGE_VERSION=$(cat ${2}/../version.txt) +BUILD_OPTIONS="--no-anaconda-upload --skip-existing --variant-config-files ${DIR}/../gitlab/conda_build_config.yaml" + +if [ $# = 2 ]; then + BUILD_OPTIONS="${BUILD_OPTIONS} --python=${2}"; +fi + +# Exclusively for Bob packages, we also set the package version +if [ -e ${1}/../version.txt ]; then + export BOB_PACKAGE_VERSION=$(cat ${1}/../version.txt) echo "Setting package version to \`${BOB_PACKAGE_VERSION}'..." fi -conda build --no-anaconda-upload --skip-existing --variant-config-files ${DIR}/../gitlab/conda_build_config.yaml --python=${1} ${2} +conda build ${BUILD_OPTIONS} ${1} -- GitLab