Skip to content

Commit

Permalink
Publish the awslambda contrib to PyPI. (pantsbuild#7343)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjyw authored Mar 9, 2019
1 parent 7b2225e commit 9873b14
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build-support/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ for Pants to function.

Python packages distributed to PyPI with pants are defined in two parts:
Metadata in src/python/pants/releases/packages.py and a function accessible from release.sh
with name `pkg_<name>_install_test` where `<name>` is the text after the last `.` in the pacakge name.
with name `pkg_<name>_install_test` where `<name>` is the text after the last `.` in the package name.

The arguments to the `pkg_<name>_install_test` function are the version string to test,
follow be zero or more pip args (for use if pip is going to be used to test the package).
followed by zero or more pip args (for use if pip is going to be used to test the package).
All contrib tests are run as part of CI, so the `pkg_<name>_install_test` function should
generally only sanity check that a module is properly importable as a plugin.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ contrib_plugin(
'src/python/pants/build_graph',
'src/python/pants/goal:task_registrar',
],
distribution_name='pantsbuild.pants.contrib.awslambda',
description='AWS Lambda pants plugin.',
distribution_name='pantsbuild.pants.contrib.awslambda_python',
description='Pants plugin for creating deployable AWS Lambdas out of python code.',
build_file_aliases=True,
register_goals=True,
)
7 changes: 7 additions & 0 deletions contrib/release_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ function pkg_avro_install_test() {
--explain gen | grep "avro-java" &> /dev/null
}

function pkg_awslambda_python_install_test() {
local version=$1
execute_packaged_pants_with_internal_backends \
--plugins="['pantsbuild.pants.contrib.awslambda_python==${version}']" \
--explain bundle | grep "lambdex" &> /dev/null
}

function pkg_thrifty_install_test() {
local version=$1
execute_packaged_pants_with_internal_backends \
Expand Down
4 changes: 4 additions & 0 deletions src/python/pants/releases/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ def contrib_packages():
"pantsbuild.pants.contrib.googlejavaformat",
"//contrib/googlejavaformat/src/python/pants/contrib/googlejavaformat:plugin",
),
Package(
"pantsbuild.pants.contrib.awslambda_python",
"//contrib/awslambda/python/src/python/pants/contrib/awslambda/python:plugin",
),
}


Expand Down

0 comments on commit 9873b14

Please sign in to comment.