Skip to content

Commit

Permalink
Constrain subprocesses to Py3 in releases.sh
Browse files Browse the repository at this point in the history
We don't consistently call `./pants3`, so it won't do this automatically for us. Without this, we run subprocesses like `bdist_wheel` with Py2, which is not what we want when using `-3`.
  • Loading branch information
Eric-Arellano committed Feb 5, 2019
1 parent 5c493b0 commit ce9445c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build-support/bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ done
py_version_number="2.7"
if [[ "${python_three}" == "true" ]]; then
py_version_number="3.6"
# N.B. We must set this to constrain spawned subprocesses to also use Python 3.
export PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS="['CPython>=3.6','CPython<4']"
fi
PY=$(which "python${py_version_number}" || exit 0)
[[ -n "${PY}" ]] || die "You must have python2.7 or python3.6 installed and on the path to release."
Expand Down

0 comments on commit ce9445c

Please sign in to comment.