[英]Pypi upload without a .pypirc?
This thing drives me nuts. 这件事让我疯狂。 Isn't it possible to simply do something like below? 是不是可以简单地做下面的事情?
python setup.py sdist upload --username me --password 1234
Or be promped to enter a password with: 或者提示输入密码:
python setup.py sdist upload --username me
Being forced to use my password in clear text in a configuration file goes against everything I ever learned about security. 被迫在配置文件中以明文形式使用我的密码违背了我所学到的关于安全性的一切。 Also not being able to manually enter a username and a password is user unfriendly. 也无法手动输入用户名和密码是用户不友好的。
Are Python folks from an other universe? 来自其他宇宙的Python人员吗? Is there a reason they try to make our lives hard? 他们试图让我们的生活变得艰难吗?
You can use Twine instead of setup.py
for uploading. 您可以使用Twine而不是setup.py
进行上传。 This has a number of other advantages. 这具有许多其他优点。 In particular, you can test the files before you upload them. 特别是,您可以在上载文件之前测试它们。 It is invoked like this: 它被调用如下:
twine upload --username me --password hunter2 dist/whatever.whl
Please note that putting a password on the command line is dangerous. 请注意,在命令行上输入密码很危险。 It will likely be recorded in ~/.bash_history
, or your shell's equivalent. 它可能会记录在~/.bash_history
,或者你的shell等效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.