serverless-python-requirements icon indicating copy to clipboard operation
serverless-python-requirements copied to clipboard

support passing `--without-urls` to `poetry export`

Open ITProKyle opened this issue 2 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched existing issues, it hasn't been reported yet

Use case description

This is to bypass a bug in pip (https://github.com/pypa/pip/issues/11511) that causes this plugin to fail. While most users may not encounter this, it is a hindrance when using private pypi repos (e.g. nexus). There is an issue open to better work around this bug with poetry (https://github.com/python-poetry/poetry-plugin-export/issues/149) but enabling the use of the existing --without-urls flag here may be a quicker path forward for the time being.

Proposed solution (optional)

Similar to the implementation of poetryWithGroups, allow this setting to be enabled.

custom:
  pythonRequirements:
    poetryWithoutUrls: true

Or, for future expandability, just allow passing any cli args to the export command.

custom:
  pythonRequirements:
    poetryExportArgs:
      - --without-urls
      - --only
      - main

ITProKyle avatar Sep 18 '23 13:09 ITProKyle

Hello! We are having a similar issue.

Instead of installing ALL groups we only want to install ONE group of our .toml requirements! There should be a way to pass extra args to poetry. --only Flag in our case.

e.g. It makes absolutely no sense to install dev-dependencies

CodeBooster97 avatar Feb 07 '24 16:02 CodeBooster97

+1 !

louis-sanchez avatar Feb 07 '24 16:02 louis-sanchez

+1!

audiostackhenry avatar Feb 07 '24 16:02 audiostackhenry