Skip to content
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

Add back sdist generation and deployment. #4957

Merged
merged 1 commit into from
Oct 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions build-support/bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ function local_version() {
run_local_pants --version 2>/dev/null
}

readonly DEPLOY_DIR="${ROOT}/dist/deploy"
readonly DEPLOY_WHEELS_PATH="wheels/pantsbuild.pants/$(local_version)"
readonly DEPLOY_WHEEL_DIR="${DEPLOY_DIR}/${DEPLOY_WHEELS_PATH}"
readonly DEPLOY_DIR="${ROOT}/dist/deploy"
readonly DEPLOY_WHEELS_PATH="wheels/pantsbuild.pants/$(local_version)"
readonly DEPLOY_WHEEL_DIR="${DEPLOY_DIR}/${DEPLOY_WHEELS_PATH}"
readonly DEPLOY_SDIST_DIR="${DEPLOY_DIR}/sdists/pantsbuild.pants/$(local_version)"

source ${ROOT}/contrib/release_packages.sh

Expand Down Expand Up @@ -142,8 +143,11 @@ function bdist_wheel_flags() {
}

function build_packages() {
rm -rf "${DEPLOY_WHEEL_DIR}"
mkdir -p "${DEPLOY_WHEEL_DIR}"
# TODO(John Sirois): Remove sdist generation and twine upload when
# https://github.com/pantsbuild/pants/issues/4956 is resolved.

rm -rf "${DEPLOY_WHEEL_DIR}" "${DEPLOY_SDIST_DIR}"
mkdir -p "${DEPLOY_WHEEL_DIR}" "${DEPLOY_SDIST_DIR}"

for PACKAGE in "${RELEASE_PACKAGES[@]}"
do
Expand All @@ -153,11 +157,12 @@ function build_packages() {

start_travis_section "${NAME}" "Building package ${NAME}-$(local_version) with target '${BUILD_TARGET}'"
run_local_pants setup-py \
--run="bdist_wheel ${BDIST_WHEEL_FLAGS:---python-tag py27}" \
--run="sdist bdist_wheel ${BDIST_WHEEL_FLAGS:---python-tag py27}" \
${BUILD_TARGET} || \
die "Failed to build package ${NAME}-$(local_version) with target '${BUILD_TARGET}'!"
wheel=$(find_pkg ${NAME})
cp -p "${wheel}" "${DEPLOY_WHEEL_DIR}/$(basename ${wheel})"
cp -p "${wheel}" "${DEPLOY_WHEEL_DIR}/"
cp -p "${ROOT}/dist/${NAME}-$(local_version)/dist/${NAME}-$(local_version).tar.gz" "${DEPLOY_SDIST_DIR}/"
end_travis_section
done
}
Expand Down Expand Up @@ -541,6 +546,7 @@ function publish_packages() {
activate_twine
trap deactivate RETURN
twine upload --sign "${DEPLOY_WHEEL_DIR}"/*.whl
twine upload --sign "${DEPLOY_SDIST_DIR}"/*.tar.gz

end_travis_section
}
Expand Down