Pio*_*ost 11 python packaging egg pip python-wheel
我有一个已经构建/下载的Python蛋,我想将其转换为PEP 427中记录的轮式格式.
我怎样才能做到这一点?
Pio*_*ost 18
答案是肯定的.
我们只需要wheel包,我们甚至不需要安装它,因为根据文档,我们可以直接使用它(因为事实.whl文件具有与文件相同的格式.zip,Python可以.zip直接在文件中运行代码):
pdobrogost@host:~$ python ./wheel-0.22.0-py2.py3-none-any.whl/wheel -h
usage: wheel [-h]
{keygen,sign,unsign,verify,unpack,install,install-scripts,convert,version,help}
...
positional arguments:
{keygen,sign,unsign,verify,unpack,install,install-scripts,convert,version,help}
commands
keygen Generate signing key
sign Sign wheel
unsign Remove RECORD.jws from a wheel by truncating the zip
file. RECORD.jws must be at the end of the archive.
The zip file must be an ordinary archive, with the
compressed files and the directory in the same order,
and without any non-zip content after the truncation
point.
verify Verify a wheel. The signature will be verified for
internal consistency ONLY and printed. Wheel's own
unpack/install commands verify the manifest against
the signature and file contents.
unpack Unpack wheel
install Install wheels
install-scripts Install console_scripts
convert Convert egg or wininst to wheel
version Print version and exit
help Show this help
optional arguments:
-h, --help show this help message and exit
Run Code Online (Sandbox Code Playgroud)
现在,我们所要做的就是使用convert参数并传递egg来转换:
pdobrogost@host:~$ python ./wheel-0.22.0-py2.py3-none-any.whl/wheel convert ./my-egg.egg
Run Code Online (Sandbox Code Playgroud)
感谢Paul Moore为virtualenv的小组提供答案,感谢Ivo提供有关#pip irc频道的更多详细信息.
要从鸡蛋生成一个轮子,wheel安装Python 的包,从命令行使用:
wheel convert <path-to-egg>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4505 次 |
| 最近记录: |