GoogleCloudPlatform / artifact-registry-python-tools

Apache License 2.0
21 stars 11 forks source link

Support for Poetry #17

Closed di closed 2 years ago

di commented 3 years ago

This project does not currently officially support Poetry (https://github.com/python-poetry/poetry).

The ability to support Poetry is currently blocked on https://github.com/python-poetry/poetry/pull/4086.

If/when that issue is resolved, we should revisit this issue and determine if Poetry is something we're able to officially support.

bitnahian commented 1 month ago

Realiving this thread for a recent update. The poetry self add approach no longer works if you've installed poetry using pipx. In order to use the gauth keyrings module, it must be injected using pipx into poetry like so:

# instead of poetry self add "keyrings.google-artifactregistry-auth==1.0.0"
pipx inject poetry keyrings.google-artifactregistry-auth

At which point, your poetry binaries will be able to find the gauth keyrings module.

Surprisingly the docs are scanty on this approach completely. Can we please update the docs on this? Similar issue mentioned here https://github.com/python-poetry/poetry/issues/8618