Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
ben-marengo-msmg opened this issue Feb 25, 2022 · 2 comments
Closed
2 tasks done
Labels
kind/feature Feature requests/implementations

Comments

@ben-marengo-msmg
Copy link

  • 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
@ben-marengo-msmg ben-marengo-msmg added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Feb 25, 2022
@finswimmer
Copy link
Member

Hello @ben-marengo-msmg,

I don't think your suggestions would work. If the keyrings.google-artifactregistry-auth package is needed for an authentification it must be installed in the environment where poetry is running and not in the venv of the project.

When poetry is installed with pipx one could install the necessary package into the same environment using pipx inject.

An alternative might be to create a Poetry Plugin that do nothing but add a new dependency into the Poetry environment.

fin swimmer

@abn abn added wontfix and removed status/triage This issue needs to be triaged labels May 12, 2022
@abn abn closed this as completed May 12, 2022
Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations
Projects
None yet
Development

No branches or pull requests

3 participants