serverless / serverless-python-requirements

⚡️🐍📦 Serverless plugin to bundle Python packages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

ITProKyle opened this issue · comments

Is there an existing issue for this?

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

Use case description

This is to bypass a bug in pip (pypa/pip#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 (python-poetry/poetry-plugin-export#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
commented

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