17

既にビルド/ダウンロードされた Python の卵があり、それをPEP 427に記載されている wheel 形式に変換したいと考えています。
これどうやってするの?

4

2 に答える 2

21

答えはイエスです。docsによると、直接使用できます (
ファイルはファイルと同じ形式であり、Python はファイル内のコードを直接実行できるため)。.whl.zip.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

あとは、引数を使用してconvert、変換する卵を渡すだけです。

pdobrogost@host:~$ python ./wheel-0.22.0-py2.py3-none-any.whl/wheel convert ./my-egg.egg

virtualenv のグループで回答を提供してくれた Paul Moore と、#pip irc チャネルの詳細を提供してくれた Ivo に感謝します。

于 2014-02-18T13:58:41.320 に答える