为Python软件包创建shell脚本的PIP功能
诗歌
具有创建Shell脚本以设置环境并启动本地Python软件包的功能。 pyproject.toml
中的以下指令生成shell脚本hercl
,其具有所需的env,包括Python Path/libraries,以运行hercl.hercl.hercl.py
> main()
:
[tool.poetry.scripts]
hercl = "hercl.hercl:main"
我听说过传言pip
本身具有相似的功能。我找不到该功能:它真的存在吗?
poetry
has a feature for creating a shell script to set up the environment and launch the local python package. The following directive in pyproject.toml
generates a shell script hercl
that has the needed env including python path/libraries to run the hercl.hercl.py
main()
:
[tool.poetry.scripts]
hercl = "hercl.hercl:main"
I have heard rumors that pip
itself has a similar capability. I have been unable to find that feature: does it really exist?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
哦!它看起来像
pip
直接支持pyproject.toml
!它称为构建系统接口这显然是一种更新的方法结合setup.py
。我会回到这里。Oh! It looks like
pip
supportspyproject.toml
directly! It is called the Build System Interface It is apparently a newer approach in conjunction withsetup.py
. I'll get back here on how that goes.