With experimental python backend: I’m wondering a...
# general
p
With experimental python backend: I’m wondering about the
repositories
param of
python_distributions
. Per https://www.pantsbuild.org/docs/python-publish-goal (linked from the bottom of https://www.pantsbuild.org/docs/python-distributions) it could include aliases like
@pypi
or private indexes. What about
@testpypi
vs
@pypi
? It might be interesting to publish first to
@testpypi
and then
@pypi
- If I put
python_distributions(repositories=["@pypi", "@testpypi"], …)
does that mean that it will publish to both repos? Or I can use TWINE_* vars to select which one to publish to? background: this is for StackStorm, an open source project. So, I don’t need to worry about publishing to private indexes.
1
c
it will publish to both.
for docker there is per registry config so you can disable/enable at will in pants conf, but we don’t have that for python/twine
what you could do is have the repo name to publish to come from outside (using
env()
on >=2.16.0.dev5)
p
So, if I don’t define
repositories
it basically defaults to
repositories=["@pypi"]
right? Using
env()
there is a fascinating idea! 2.16 is looking better and better.
c
hmm.. maybe twine is short circuit if you set the repo url to an empty string..?
no, default is
none
to not publish to public by mistake
p
Ah. That makes sense.