https://pantsbuild.org/ logo
#development
Title
# development
s

shy-advantage-49800

11/06/2022, 1:24 PM
A note on https://www.pantsbuild.org/docs/python-publish-goal about the fact that the following this to be added it would be cool.
Copy code
[subprocess-environment]
env_vars.add = ["TWINE_PASSWORD", "TWINE_USERNAME"]
If I didn't know about this, I wouldn't be able to infer based on the page. ๐Ÿ‘€
c

curved-television-6568

11/06/2022, 7:31 PM
Did it not work for you without that extra
subprocess-environment
configuration? In which case itโ€™s a bug, as it is meant to work without it: https://github.com/pantsbuild/pants/blob/985676e86e1cb073804e491e1d9ef62d07476a1c/src/python/pants/backend/python/goals/publish.py#L115-L127
s

shy-advantage-49800

11/06/2022, 7:32 PM
it did not, I had to add it
"credentials for username not found"
added the suprocess-environment and worked
c

curved-television-6568

11/06/2022, 7:33 PM
Ah, on a second look through I think I see the issue, it only adds the versions with the repo suffix on the env name, not bare names.
So, yes indeed that is an oversight and bug.
that is, this version of the env name with the repo suffix ought to work also without the extra config:
TWINE_USERNAME_<repository>
s

shy-advantage-49800

11/06/2022, 7:43 PM
I see.. Yep, I didn't try that ๐Ÿ‘€
c

curved-television-6568

11/07/2022, 4:03 PM