Replies: 2 comments 2 replies
-
Hey @fedexist! Without using GCP myself, and so without being able to play around with different options, this would require some detailed inspection of the source code, for which, unfortunately, currently I cannot find the time. I would recommend to apply the suggested way of using tox, as detailed by @di who is a very experienced Python developer, and afaik also a long time tox user, so I imagine he chose the best option already. Sorry, that is all I have. |
Beta Was this translation helpful? Give feedback.
-
Hi @jugmac00, thanks for the feedback, I ended up using the suggested way by using a requirements file to be installed using |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm currently trying to use tox with a project which has dependencies stored on Artifact Registry, the Google Cloud Platform managed PyPi index, but I can't, due to how
PIP_EXTRA_INDEX_URL
works for both provisioning of tox and testenv.This is my tox.ini
As per the documentation provided by Google, I set the keyring as required and use passenv to make sure that the environment variable
GOOGLE_APPLICATION_CREDENTIALS
is propagated to the testenv.What happens is the following:
PIP_EXTRA_INDEX_URL
,tox -e clean,build,publish
works: this means that the keyring plugin gets installed during the provisioning and is actually used for authenticating with Artifact RegistryPIP_EXTRA_INDEX_URL
, tox can't get past the provisioning phase because it tries to authenticate with the Artifact Registry in order to installkeyrings.google-artifactregistry-auth
: by default username and password are asked via prompt and tox gets stuck there, because obviously it can't input anything :)So, what is clear here is that
PIP_EXTRA_INDEX_URL
is used for both tox provisioning and testenv package installation and I have a few questions:PIP_EXTRA_INDEX_URL
only for the testenv?keyrings.google-artifactregistry-auth
as a sort of seed package, before everything else? Maybe there's a plugin for that?I realize that I could put the package dependency in a requirements.txt file with the
--extra-index-url
flag (that is what's actually shown on the GCP github page linked earlier), but I was wondering if tox could manage this issue in a more elegant way. Or maybe I'm simply missing a way to already do what I want.I see also that there's a somewhat related issue with #2428, regarding how
install_command
is used.Thank you for your help.
Beta Was this translation helpful? Give feedback.
All reactions