将httpie 打包成 Python "PYZ" (zipapp) 很简单,例如使用
$ pip install --upgrade zapp
$ zapp httpie.pyz httpie.__main__:main httpie
$ python ./httpie.pyz --version
1.0.3
现在我尝试将httpie-aws-authv4作为 httpie 的插件包含在内,用于 AWS 身份验证。唉,httpie
不拿起那个插件。
$ zapp httpie-aws4.pyz httpie.__main__:main httpie httpie-aws-authv4
$ python ./httpie-aws4.pyz
usage: http [--json] [--form] [--pretty {all,colors,format,none}]
...
[--auth USER[:PASS]] [--auth-type {basic,digest}]
$ python ./httpie-aws4.pyz -A aws4 http://localhost:9200/
...
http: error: argument --auth-type/-A: invalid choice: u'aws4' (choose from 'basic', 'digest')
应该说[--auth-type {basic,digest,aws4}]
任何人都知道如何使这项工作?