-
-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to pex 1.4.5. #6267
Upgrade to pex 1.4.5. #6267
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -584,8 +584,6 @@ function build_pex() { | |
build_3rdparty_packages "${PANTS_UNSTABLE_VERSION}" | ||
fi | ||
|
||
activate_tmp_venv && trap deactivate RETURN && pip install "pex==1.4.3" || die "Failed to install pex." | ||
|
||
local requirements=() | ||
for pkg_name in $PANTS_PEX_PACKAGES; do | ||
requirements=("${requirements[@]}" "${pkg_name}==${PANTS_UNSTABLE_VERSION}") | ||
|
@@ -596,16 +594,27 @@ function build_pex() { | |
platform_flags=("${platform_flags[@]}" "--platform=${platform}") | ||
done | ||
|
||
pex \ | ||
-o "${dest}" \ | ||
--entry-point="pants.bin.pants_loader:main" \ | ||
--no-build \ | ||
--no-pypi \ | ||
--disable-cache \ | ||
"${platform_flags[@]}" \ | ||
-f "${DEPLOY_PANTS_WHEEL_DIR}/${PANTS_UNSTABLE_VERSION}" \ | ||
-f "${DEPLOY_3RDPARTY_WHEEL_DIR}/${PANTS_UNSTABLE_VERSION}" \ | ||
"${requirements[@]}" | ||
( | ||
PEX_VERSION=$(grep "pex==" "${ROOT}/3rdparty/python/requirements.txt" | sed -e "s|pex==||") | ||
PEX_PEX=pex27 | ||
|
||
cd $(mktemp -d -t build_pex.XXXXX) | ||
trap "rm -rf $(pwd -P)" EXIT | ||
|
||
curl -sSL https://github.com/pantsbuild/pex/releases/download/v${PEX_VERSION}/${PEX_PEX} -O | ||
chmod +x ./${PEX_PEX} | ||
|
||
./${PEX_PEX} \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. might be nice to libify this bootstrap-then-run routine for general use in common.sh? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, although this is the only shell script to use pex. I'll re-consider on #6214 which I plucked this from since it's languishing. |
||
-o "${dest}" \ | ||
-c pants \ | ||
--no-build \ | ||
--no-pypi \ | ||
--disable-cache \ | ||
"${platform_flags[@]}" \ | ||
-f "${DEPLOY_PANTS_WHEEL_DIR}/${PANTS_UNSTABLE_VERSION}" \ | ||
-f "${DEPLOY_3RDPARTY_WHEEL_DIR}/${PANTS_UNSTABLE_VERSION}" \ | ||
"${requirements[@]}" | ||
) | ||
|
||
if [[ "${PANTS_PEX_RELEASE}" == "stable" ]]; then | ||
mkdir -p "$(dirname "${stable_dest}")" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one potential alternative to this would be:
which should net the same effect w/o the manual parsing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a bootstrap issue here. This grabs the pants pex dep to form the url to fetch the corresponding released pex pex, so we don't have pex yet.