什么`twine upload dist/*`命令呢?

Mon*_*all 2 python pypi twine

我提前道歉,因为这似乎是一个基本问题......

我正在尝试学习使用mujoco(链接在这里),并在其python绑定Makefile里面它有:

upload:
   rm -rf dist
   python setup.py sdist
   twine upload dist/*
Run Code Online (Sandbox Code Playgroud)

是什么twin upload dist/*命令呢?另外,这要求我输入如下用户名和密码:

Uploading distributions to https://pypi.python.org/pypi
Enter your username: guest
Enter your password: 
Uploading mujoco-py-0.5.7.tar.gz
HTTPError: 401 Client Error: You must be identified to edit package information for url: https://pypi.python.org/pypi
Makefile:2: recipe for target 'upload' failed
Run Code Online (Sandbox Code Playgroud)

这是要求我的电脑用户名和密码吗?

Jit*_*ama 5

Twine是一个常用的系统,用于将项目构建上传到PyPI(Python包索引).

它将负责将项目的构建工件以wheel,sdist等格式安全地传输到PyPI或其他一些用户定义的索引服务器.

当您指定时twine upload <files>,twine将尝试将所述文件上载到PyPI,但为了这样做,它将要求您自己进行身份验证.这是因为PyPI希望保护一个项目,防止他们的广告包被一个"做得好"的人"劫持".为了继续执行此步骤,您必须提供标记为上载项目工件所属项目的权威凭据.

看起来mujoco项目Makefile包含一个目标,可以通过利用Twine应用程序轻松将项目更新上传到PyPI.该目标只能由软件包维护者使用.

哦,如果您想知道,该python setup.py sdist命令是什么使得源代码工件可以上传到PyPI.它会将此工件放在./build/目录中project-name_version.tar.gz.