在 rpm 构建期间查找 wheel 依赖项

Find wheel dependencies during an rpm build

我正在处理的项目的 rpm 构建没有找到依赖项,我似乎无法弄清楚原因。我已经将它们全部安装到我的虚拟环境中,并且它们都保存在我定义的 wheel 目录中。我正在使用 rpmvenv 库来生成 rpm,但每次我从我的安装脚本中 运行 它时,它都会返回:

Could not find a version that satisfies the requirement numpy==1.11.0 (from versions: )
No matching distribution found for numpy==1.11.0

如果我在我的 venv 中执行 pip list,那个版本的 numpy 就在那里,并且包的轮子也存在。 rpmvenv 需要一个 rpm.json 文件到 运行,在我的文件中我有行

"pip_flags": "--no-index --find-links=/path/to/wheel/directory"

python_venv 扩展中。我的印象是这一行告诉构建在我的 wheel 目录中查找依赖项,但找不到它们。我也尝试将 --use-wheel 标志添加到这一行,但无济于事。

我在这里遗漏了什么?

pip 和 rpm 使用不同的依赖解析器和数据库。如果你使用 pip 安装 python 模块,那么 rpm 不知道它。 Rpm 对 python 路径及其存储模块的位置一无所知。它只是检查 rpmdb 是否安装了 python-numpy.rpm。

如果你需要那个包你可以在这里找到它https://copr.fedorainfracloud.org/coprs/neteler/numpy/