为Python软件包创建shell脚本的PIP功能

发布于 2025-01-28 06:33:56 字数 352 浏览 1 评论 0原文

诗歌具有创建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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

居里长安 2025-02-04 06:33:56

哦!它看起来像pip直接支持pyproject.toml!它称为构建系统接口这显然是一种更新的方法结合setup.py。我会回到这里。

Oh! It looks like pip supports pyproject.toml directly! It is called the Build System Interface It is apparently a newer approach in conjunction with setup.py. I'll get back here on how that goes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文