使用诗歌使用Cython的包装库的最佳实践

发布于 2025-02-04 07:15:37 字数 651 浏览 4 评论 0 原文

我一直使用诗歌来开发Python软件包。现在,我想在一个新项目中使用Cython,而我对如何构建de库有些困惑,无论是否使用 setup.py.py 而不是使用 poetry 完全。

我已经看过帖子(例如 a>)关于如何在软件包中包括 Cython 代码(使用 setup.py ),但不使用诗歌。其他,这个 -failed-with-with-poetry-backend“> this ),但它们取决于 build.py.py.py 脚本,并且在其中一个中说的评论说,如果 GCC 未安装。

那么,使用诗歌使用Cython的包装(并发布给PYPI)库的最佳实践是什么?

I've always used poetry to develop python packages. Now I want to use Cython in a new project and I'm a little confuse about how to structure de library, whether or not to use a setup.py instead of using poetry at all.

I've seen posts (like this) about how to include cython code in a package (with a setup.py) but not using poetry. Others, This one (and this) does, but they depend on a build.py script, and a comment said in one of them that approach wont work if gcc is not installed.

So, what would be the best practices for packaging (and publishing to PyPI) libraries that use cython using poetry?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文