terraform-aws-lambda icon indicating copy to clipboard operation
terraform-aws-lambda copied to clipboard

feat: Support passing extra args to pip install

Open LironEr opened this issue 1 year ago β€’ 9 comments

Description

Added support to pass extra arguments to pip install command

{
  path                   = "src/python-app1",
  pip_requirements       = true,
  pip_install_extra_args = ["--platform", "manylinux2014_aarch64", "--only-binary", ":all:"]
}

Motivation and Context

Due to limitations with our CI, we can't use docker when installing and zipping requirements. To overcome this we use the platform flag when running pip install to download the right distribution per lambda architecture.

Breaking Changes

No

How Has This Been Tested?

  • [ ] I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • [ ] I have tested and validated these changes using one or more of the provided examples/* projects

I have tested these changes locally and deployed a lambda to AWS. I am happy to do additional testing if necessary.

  • [x] I have executed pre-commit run -a on my pull request

LironEr avatar Jan 17 '25 08:01 LironEr

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

github-actions[bot] avatar Feb 27 '25 00:02 github-actions[bot]

Please review πŸ™

LironEr avatar Feb 27 '25 02:02 LironEr

This is a needed improvement, please review

Ron-Be avatar Mar 11 '25 08:03 Ron-Be

please review πŸ™

shira-lev avatar Mar 11 '25 08:03 shira-lev

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

github-actions[bot] avatar Apr 11 '25 00:04 github-actions[bot]

@antonbabenko please review πŸ™

LironEr avatar Apr 11 '25 06:04 LironEr

I have another use case for this, in order to be able to use packages published in a Gemfury repository, the following extra pip argument is needed:

pip install py-sample --extra-index-url <Repo-URL>

See: https://gemfury.com/help/pypi-server/

pawelpesz avatar Apr 17 '25 11:04 pawelpesz

Hi @antonbabenko is there any update on this? Thanks

RonBeny avatar Apr 22 '25 05:04 RonBeny

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

github-actions[bot] avatar Jun 21 '25 00:06 github-actions[bot]

This PR was automatically closed because of stale in 10 days

github-actions[bot] avatar Jul 01 '25 00:07 github-actions[bot]

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Jul 31 '25 02:07 github-actions[bot]