lambdex
A tool for turning .pex files into Function-as-a-Service artifacts (https://github.com/pantsbuild/lambdex).
Backend: pants.backend.awslambda.python
Config section: [lambdex]
Basic options
None
Advanced options
console_script
--lambdex-console-script=<str>
PANTS_LAMBDEX_CONSOLE_SCRIPT
[lambdex]
console_script = <str>
lambdex
The console script for the tool. Using this option is generally preferable to (and mutually exclusive with) specifying an --entry-point
since console script names have a higher expectation of staying stable across releases of the tool. Usually, you will not want to change this from the default.
entry_point
--lambdex-entry-point=<str>
PANTS_LAMBDEX_ENTRY_POINT
[lambdex]
entry_point = <str>
None
The entry point for the tool. Generally you only want to use this option if the tool does not offer a --console-script
(which this option is mutually exclusive with). Usually, you will not want to change this from the default.
install_from_resolve
--lambdex-install-from-resolve=<str>
PANTS_LAMBDEX_INSTALL_FROM_RESOLVE
[lambdex]
install_from_resolve = <str>
None
If specified, install the tool using the lockfile for this named resolve.
This resolve must be defined in [python].resolves
, as described in https://www.pantsbuild.org/v2.18/docs/python-third-party-dependencies#user-lockfiles.
The resolve's entire lockfile will be installed, unless specific requirements are listed via the requirements
option, in which case only those requirements will be installed. This is useful if you don't want to invalidate the tool's outputs when the resolve incurs changes to unrelated requirements.
If unspecified, and the lockfile
option is unset, the tool will be installed using the default lockfile shipped with Pants.
If unspecified, and the lockfile
option is set, the tool will use the custom lambdex
"tool lockfile" generated from the version
and extra_requirements
options. But note that this mechanism is deprecated.
interpreter_constraints
--lambdex-interpreter-constraints="['<str>', '<str>', ...]"
PANTS_LAMBDEX_INTERPRETER_CONSTRAINTS
[lambdex]
interpreter_constraints = [
'<str>',
'<str>',
...,
]
[ "CPython>=3.7,<3.12" ]
Python interpreter constraints for this tool.
requirements
--lambdex-requirements="['<str>', '<str>', ...]"
PANTS_LAMBDEX_REQUIREMENTS
[lambdex]
requirements = [
'<str>',
'<str>',
...,
]
[]
If install_from_resolve
is specified, install these requirements, at the versions provided by the specified resolve's lockfile.
Values can be pip-style requirements (e.g., tool
or tool==1.2.3
or tool>=1.2.3
), or addresses of python_requirement
targets (or targets that generate or depend on python_requirement
targets).
The lockfile will be validated against the requirements - if a lockfile doesn't provide the requirement (at a suitable version, if the requirement specifies version constraints) Pants will error.
If unspecified, install the entire lockfile.
Deprecated options
layout
--lambdex-layout=<LambdexLayout>
PANTS_LAMBDEX_LAYOUT
[lambdex]
layout = <LambdexLayout>
lambdex, zip
default:
zip
Deprecated, will be removed in version: 2.19.0.dev0.
Remove the whole [lambdex] section, as Lambdex is deprecated and its functionality will be removed. If you have `layout = "zip"`, no further action is required, as you are already using the recommended layout.<br /><br />If you have `layout = "lambdex"`, removing the section will switch any `python_aws_lambda_function` (formerly `python_awslambda`) and `python_google_cloud_function` targets to using the `zip` layout, as recommended by cloud vendors. (If you are using `python_aws_lambda_function`, you will need to also update the handlers configured in the cloud from `lambdex_handler.handler` to `lambda_function.handler`.)<br /><br />See the docs for more details:<br /><br />* https://www.pantsbuild.org/v2.18/docs/awslambda-python#migrating-from-pants-216-and-earlier<br />* https://www.pantsbuild.org/v2.18/docs/google-cloud-function-python#migrating-from-pants-216-and-earlier
Explicitly control the layout used for python_aws_lambda_function
(formerly python_awslambda
) and python_google_cloud_function
targets. This option exists for the transition from Lambdex-based layout to the plain zip layout, as recommended by cloud vendors.
Related subsystems
None