paketo-buildpacks / poetry

Apache License 2.0
5 stars 6 forks source link

Support additional, private package repositories #455

Open yonkeltron opened 3 months ago

yonkeltron commented 3 months ago

Thanks for making such a wonderful buildpack!

Describe the Enhancement

Allow usage of additional, private Python package repositories for dependencies. Allow providing authentication credential configuration via environment variables.

I don't know how much this relates to #351.

Possible Solution

One option is to allow for specifying an external configuration file/source to allow for full control of the Poetry configuration at build time. This might be overkill, however, for this one use-case.

Motivation

Currently, private repositories are supported by Poetry itself via the CLI and [[tool.poetry.source]] configuration stanzas in the pyproject.toml. Along these same lines, authentication can be separately handled by the appropriate invocations of poetry config. However, those settings are not respected by this buildpack when a repository does require authentication. This renders this buildpack very hard to use in corporate environments with internally-developed, non-public package dependencies.