pypi 包的 apt 依赖项 [英] apt dependies for pypi package

查看:71
本文介绍了pypi 包的 apt 依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于安装pypi缺少的第三方二进制依赖的政策问题.

Question about the policy of installing third-party binary dependencies missing from pypi.

有一个通过 pypi 分发的包,这取决于来自 debian 包的 debian 存储库 (apt install) 的库集.没有这些库,包将无法运行/安装.如何安装/要求用户安装这些库.

There is a package distributed via pypi, depending on the set of libraries from the debian repository of debian packages (apt install). Without these libraries, the package will not work / install. How to install / ask the user to install these libraries.

关于这个问题的社区政策是什么?

What is community policy on this issue?

推荐答案

最正确的方法是以正确的系统包格式分发包 — rpm、deb 等等.这些格式允许声明其他系统依赖项,以便包管理器自动解析依赖项版本并安装依赖项.

The most correct way is to distribute your packages in the proper system package format — rpm, deb, whatever. Those formats allow to declare other system dependencies so that package managers automatically resolve dependencies version and install the dependencies.

要从 Python 创建 deb 包,请使用 https://pypi.org/project/stdeb/.

To create a deb package from a Python one use https://pypi.org/project/stdeb/.

如果您想从 PyPI 分发 Python 包,则该包无法声明系统依赖项.处理此问题的唯一方法是记录依赖项并让用户处理它们.

If you want to distribute Python package from PyPI there is no way for the package to declare system dependencies. The only way to handle this is to document dependencies and let the user handle them.

这篇关于pypi 包的 apt 依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆