例如:我numpy
使用英特尔MKL库进行构建,并且可以在Python Shell中使用它,但是如果我想从依赖于的存储库中安装某些软件包numpy
,则不考虑我的构建。
在Ubuntu中包含我的Python构建软件包的最简单方法是什么,以便从存储库中的软件包可以找到它,最好不再构建?
使用checkinstall生成并安装一个deb文件。
Checkinstall将替换标准编译的“ make install”部分。不仅仅是将文件复制到其目标目录,它还将生成并安装一个deb文件。
如果您不能使用checkinstall,则可以使用equivs创建一个虚拟软件包。请注意,这可能会在更新或卸载时产生问题,仅建议专家用户使用。它具有生长失控的已知趋势,因此请谨慎使用。
安装设备:
sudo apt-get install equivs
创建控制文件:
equivs-control python-numpy
这将创建一个名为python-numpy的模板控制文件(名称无关紧要),将其编辑为python-numpy,如下所示:
### Commented entries have reasonable defaults.
### Uncomment to edit them.
# Source: <source package name; defaults to package name>
Section: misc
Priority: optional
# Homepage: <enter URL here; no default>
Standards-Version: 3.9.2
Package: python-numpy
Version: 9.9
# Maintainer: Your Name <[email protected]>
# Pre-Depends: <comma-separated list of packages>
# Depends: <comma-separated list of packages>
# Recommends: <comma-separated list of packages>
# Suggests: <comma-separated list of packages>
# Provides: <comma-separated list of packages>
# Replaces: <comma-separated list of packages>
# Architecture: all
# Copyright: <copyright file; defaults to GPL2>
# Changelog: <changelog file; defaults to a generic changelog>
# Readme: <README.Debian file; defaults to a generic one>
# Extra-Files: <comma-separated list of additional files for the doc directory>
# Files: <pair of space-separated paths; First is file to include, second is destination>
# <more pairs, if there's more than one file to include. Notice the starting space>
Description: <short description; defaults to some wise words>
long description and info
.
second paragraph
您提供给它的数据越多,deb越好。我只修改了2个字段:
更好(但未经我测试)的解决方案可能是创建一个不同的包名称,将其链接到python-pynum-dummy,然后在Provides行中使用python-numpy。这应该更清洁。
最后建立deb。
equivs-build python-numpy
并安装它。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句