Skip to content

For the package process, allow arbitrary list of additional pip CLI options to run for the pip install #668

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

Open
cazlo opened this issue Mar 21, 2025 · 1 comment · May be fixed by #669
Labels

Comments

@cazlo
Copy link

cazlo commented Mar 21, 2025

Is your request related to a problem? Please describe.

When trying to package a lambda with pypi python dependencies in a few environments, I experience runtime issues with the cryptography dependency, as described at https://stackoverflow.com/questions/67646196/aws-lambda-python-cryptography-cannot-open-shared-object-files.

build env lambda runtime error (in aws)
alpine errors loading libc.muslc shared objects bindings
arm mac errors when loading cryptography rust bindings

I can get around this by doing the solution described at https://stackoverflow.com/a/74495308, effectively hardcoding in my local terraform package.py cache pip options: --only-binary=:all: --platform manylinux2014_x86_64.

Describe the solution you'd like.

Add a new variable similar to docker_additional_options like:

variable "pip_additional_options" {
  description = "Additional options to pass to the pip install command (e.g. to platform, etc.)"
  type        = list(string)
  default     = []
}

This would be passed to package.py and used to populate the pip install command list there (adding to current command defaults and not supporting override of them).

Describe alternatives you've considered.

ECR container image path

Additional context

Related to #459

Copy link

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale label Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant