Skip to content

Commit

Permalink
Merge d848cf4 into 6f181d5
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois committed Mar 25, 2015
2 parents 6f181d5 + d848cf4 commit ae8abfe
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 72 deletions.
11 changes: 4 additions & 7 deletions build-support/bin/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ if [[ "${skip_sanity_checks:-false}" == "false" ]]; then
fi

if [[ "${skip_distribution:-false}" == "false" ]]; then
# TODO(John Sirois): Take this further and dogfood a bootstrap from the sdists generated by
# setup_py
banner "Running pants distribution tests"
(
# The published pants should need no local plugins beyond the python backend to distribute
Expand All @@ -147,12 +145,11 @@ packages: [
EOF
) && \
./pants.pex ${INTERPRETER_ARGS[@]} --config-override=${config} binary \
src/python/pants:_pants_transitional_publishable_binary_ && \
mv dist/_pants_transitional_publishable_binary_.pex dist/self.pex && \
src/python/pants/bin:pants && \
mv dist/pants.pex dist/self.pex && \
./dist/self.pex ${INTERPRETER_ARGS[@]} --config-override=${config} binary \
src/python/pants:_pants_transitional_publishable_binary_ && \
./dist/self.pex --config-override=${config} setup-py --recursive \
src/python/pants:pants-packaged
src/python/pants/bin:pants && \
./build-support/bin/release.sh -pn
) || die "Failed to create pants distributions."
fi

Expand Down
24 changes: 19 additions & 5 deletions build-support/bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ROOT=$(cd $(dirname "${BASH_SOURCE[0]}") && cd "$(git rev-parse --show-toplevel)
source ${ROOT}/build-support/common.sh

function run_local_pants() {
PANTS_DEV=1 ${ROOT}/pants "$@"
${ROOT}/pants "$@"
}

# When we do (dry-run) testing, we need to run the packaged pants.
Expand Down Expand Up @@ -136,7 +136,13 @@ function post_install() {
}

function install_and_test_packages() {
PIP_ARGS="$@ --quiet"
PIP_ARGS=(
"$@"
--quiet

# Needed for now by pantsbuild.pants which any install requires.
--allow-external antlr-python-runtime --allow-unverified antlr-python-runtime
)

for PACKAGE in "${RELEASE_PACKAGES[@]}"
do
Expand All @@ -146,7 +152,7 @@ function install_and_test_packages() {
banner "Installing and testing package ${NAME}-$(local_version) ..."

pre_install && \
eval $INSTALL_TEST_FUNC $PIP_ARGS && \
eval $INSTALL_TEST_FUNC ${PIP_ARGS[@]} && \
post_install || \
die "Failed to install and test package ${NAME}-$(local_version)!"
done
Expand Down Expand Up @@ -183,8 +189,9 @@ function usage() {
echo "PyPi. Credentials are needed for this as described in the"
echo "release docs: http://pantsbuild.github.io/release.html"
echo
echo "Usage: $0 (-h|-opd)"
echo "Usage: $0 (-h|-pnt)"
echo " -h Prints out this help message."
echo " -p Use pants.pex to do the release instead of PANTS_DEV=1 ./pants."
echo " -n Performs a release dry run."
echo " All package distributions will be built, installed locally in"
echo " an ephemeral virtualenv and exercised to validate basic"
Expand All @@ -202,15 +209,22 @@ function usage() {
fi
}

while getopts "hnt" opt; do
use_pex="false"

while getopts "hpnt" opt; do
case ${opt} in
h) usage ;;
p) use_pex="true" ;;
n) dry_run="true" ;;
t) test_release="true" ;;
*) usage "Invalid option: -${OPTARG}" ;;
esac
done

if [[ "${use_pex}" != "true" ]]; then
export PANTS_DEV=1
fi

if [[ "${dry_run}" == "true" && "${test_release}" == "true" ]]; then
usage "The dry run and test options are mutually exclusive, pick one."
elif [[ "${dry_run}" == "true" ]]; then
Expand Down
4 changes: 1 addition & 3 deletions src/python/pants/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ python_library(
description='A bottom-up build tool.',
namespace_packages=['pants'],
).with_binaries(
# TODO(John Sirois): Switch back when target cycles have been sorted out.
# pants='src/python/pants/bin:pants',
pants=':_pants_transitional_publishable_binary_',
pants='src/python/pants/bin:pants',
)
)

Expand Down
57 changes: 0 additions & 57 deletions src/python/pants/BUILD.transitional

This file was deleted.

0 comments on commit ae8abfe

Please sign in to comment.