https://pantsbuild.org/ logo
#general
Title
# general
p

proud-dentist-22844

02/15/2023, 7:12 PM
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

curved-television-6568

02/15/2023, 7:14 PM
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

proud-dentist-22844

02/15/2023, 7:18 PM
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

curved-television-6568

02/15/2023, 7:19 PM
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

proud-dentist-22844

02/15/2023, 7:21 PM
Ah. That makes sense.
3 Views