在bdist_rpm中设置RPM包名称
我正在使用 Python setuptools 来构建包。由于一些命名限制,我想将使用 bdist_rpm
选项构建的 rpm 命名为与 Python 包名称不同的名称。
可以在[bdist_rpm]
部分的setup.cfg
中完成吗?
I am using Python setuptools for building a package. I would like to name the rpm built from bdist_rpm
option to be different than the Python package name due to some naming restrictions.
Can it be done in the setup.cfg
in the [bdist_rpm]
section?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
fpm 工具可以轻松生成 RPM 包并更改名称或其他参数。默认情况下,fpm 使 RPM 带有“python- 前缀名称,但可以使用 -n 参数设置包名称。示例:
The fpm tool makes easy to generate the RPM package and change the name or another parameter. By default, fpm makes the RPM with "python- prefix name, but the package name can be set with -n parameter. An example:
嗯,它确实有点不标准,因此不直接支持。但是,您可以执行 python setup.py bdist_rpm --spec-only ,这将在 dist/ 内生成一个名为 project.spec 的规范文件,如下所示:
要从此处成功构建 rpm,您需要:
我相信您可以自动执行此操作如果你真的想以某种方式
Well it is indeed a slightly non-standard and so not directly supported. You can however do
python setup.py bdist_rpm --spec-only
and this will generate a spec file inside dist/ named project.spec, starting like this:To succesfully build rpm from here you need to:
I am sure you could automate this in some way if you really wanted to