Skip to content

support for pre-installing packages for private source repositories #5232

@ben-marengo-msmg

Description

@ben-marengo-msmg
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

this request follows #4086.
the keyrings.google-artifactregistry-auth package must be installed before the private repo source can be authenticated
its also not strictly speaking a dependency of the current project

Possible implementation 1

given the following configuration, whenever this secondary source is loaded, keyrings.google-artifactregistry-auth would be installed

[[tool.poetry.source]]
name = "my_pypi"
url = "https://europe-west2-python.pkg.dev/my-gcp-project/mypypi/simple"
secondary = true
requires = ["keyrings.google-artifactregistry-auth==1.0.0"]

the downside of this is that dependency resolution would have to be done multiple times?

Possible implementation 2

given the following configuration, when the venv is first spun up, before any secondary sources are loaded, the venv_bootstrap_commands are executed

[tool.poetry]
name = "poetry-demo"
version = "0.1.0"
venv_bootstrap_commands = 
    pip install keyrings.google-artifactregistry-auth==1.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureFeature requests/implementations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions