Skip to content

Commit

Permalink
Merge pull request #18 from jakirkham-feedstocks/add_missing_exe_ext
Browse files Browse the repository at this point in the history
Add missing exe extension to conda call on Windows
  • Loading branch information
jakirkham committed May 26, 2018
2 parents d8f0cb7 + 4024f66 commit b4163ff
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 56 deletions.
34 changes: 34 additions & 0 deletions .circleci/build_steps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash

# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here
# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent
# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also
# benefit from the improvement.

set -xeuo pipefail
export PYTHONUNBUFFERED=1

cat >~/.condarc <<CONDARC
channels:
- conda-forge
- defaults
conda-build:
root-dir: /home/conda/feedstock_root/build_artifacts
show_channel_urls: true
CONDARC

# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artifacts.
conda clean --lock

conda install --yes --quiet conda-forge-ci-setup=1 conda-build
# Overriding global run_conda_forge_build_setup_linux with local copy.
source /home/conda/recipe_root/run_conda_forge_build_setup_linux

conda build /home/conda/recipe_root -m /home/conda/feedstock_root/.ci_support/${CONFIG}.yaml --quiet
/home/conda/recipe_root/upload_or_check_non_existence.py /home/conda/recipe_root conda-forge --channel=main -m /home/conda/feedstock_root/.ci_support/${CONFIG}.yaml

touch "/home/conda/feedstock_root/build_artifacts/conda-forge-build-done-${CONFIG}"
76 changes: 25 additions & 51 deletions .circleci/run_docker_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,69 +5,43 @@
# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also
# benefit from the improvement.

set -xeuo pipefail

FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;)
RECIPE_ROOT=$FEEDSTOCK_ROOT/recipe

docker info

config=$(cat <<CONDARC
channels:
- conda-forge
- defaults
conda-build:
root-dir: /home/conda/feedstock_root/build_artifacts
show_channel_urls: true
CONDARC
)

# In order for the conda-build process in the container to write to the mounted
# volumes, we need to run with the same id as the host machine, which is
# normally the owner of the mounted volumes, or at least has write permission
HOST_USER_ID=$(id -u)
export HOST_USER_ID=$(id -u)
# Check if docker-machine is being used (normally on OSX) and get the uid from
# the VM
if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then
HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u)
export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u)
fi

rm -f "$FEEDSTOCK_ROOT/build_artifacts/conda-forge-build-done"
ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts"

cat << EOF | docker run -i \
-v "${RECIPE_ROOT}":/home/conda/recipe_root \
-v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root \
-e CONFIG="$CONFIG" \
-e HOST_USER_ID="${HOST_USER_ID}" \
-a stdin -a stdout -a stderr \
condaforge/linux-anvil \
bash || exit 1
set -e
set +x
export BINSTAR_TOKEN=${BINSTAR_TOKEN}
set -x
export PYTHONUNBUFFERED=1
echo "$config" > ~/.condarc
# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artifacts.
conda clean --lock
# Make sure we pull in the latest conda-build version too
conda install --yes --quiet conda-forge-ci-setup=1 conda-build
# Overriding global run_conda_forge_build_setup_linux with local copy.
source /home/conda/recipe_root/run_conda_forge_build_setup_linux
conda build /home/conda/recipe_root -m /home/conda/feedstock_root/.ci_support/${CONFIG}.yaml --quiet || exit 1
/home/conda/recipe_root/upload_or_check_non_existence.py /home/conda/recipe_root conda-forge --channel=main -m /home/conda/feedstock_root/.ci_support/${CONFIG}.yaml || exit 1
touch /home/conda/feedstock_root/build_artifacts/conda-forge-build-done
EOF
if [ -z "$CONFIG" ]; then
echo "Need to set CONFIG env variable"
exit 1
fi

# double-check that the build got to the end
# see https://github.com/conda-forge/conda-smithy/pull/337
# for a possible fix
set -x
test -f "$FEEDSTOCK_ROOT/build_artifacts/conda-forge-build-done" || exit 1
mkdir -p "$ARTIFACTS"
DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}"
rm -f "$DONE_CANARY"

docker run -it \
-v "${RECIPE_ROOT}":/home/conda/recipe_root \
-v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root \
-e CONFIG \
-e BINSTAR_TOKEN \
-e HOST_USER_ID \
condaforge/linux-anvil \
bash \
/home/conda/feedstock_root/.circleci/build_steps.sh

# verify that the end of the script was reached
test -f "$DONE_CANARY"
8 changes: 4 additions & 4 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: conda-forge-ci-setup
version: 1.3.4
version: 1.3.5

build:
number: 0
Expand All @@ -26,11 +26,11 @@ requirements:

test:
commands:
- if not exist "%SCRIPTS%\\run_conda_forge_build_setup.bat" exit 1 # [win]
- if not exist "%PREFIX%\\Scripts\\run_conda_forge_build_setup.bat" exit 1 # [win]
- test -f "${PREFIX}/bin/run_conda_forge_build_setup" # [unix]
- if not exist "%SCRIPTS%\\ff_ci_pr_build.py" exit 1 # [win]
- if not exist "%PREFIX%\\Scripts\\ff_ci_pr_build.py" exit 1 # [win]
- test -f "${PREFIX}/bin/ff_ci_pr_build" # [unix]
- if not exist "%SCRIPTS%\\upload_or_check_non_existence.py" exit 1 # [win]
- if not exist "%PREFIX%\\Scripts\\upload_or_check_non_existence.py" exit 1 # [win]
- test -f "${PREFIX}/bin/upload_or_check_non_existence" # [unix]

about:
Expand Down
2 changes: 1 addition & 1 deletion recipe/run_conda_forge_build_setup_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ set "CONDA_BLD_PATH=C:\\bld\\"

conda.exe info
conda.exe config --show-sources
conda list --show-channel-urls
conda.exe list --show-channel-urls

0 comments on commit b4163ff

Please sign in to comment.