我正在努力dh
为python 3创建软件包(而不是为python 2创建软件包)。setup.py
当使用调用时python3
,我会使用python 3构建的。我debian
为py3k有一个单独的目录,因此我只想为该版本构建。
debian/rules
看起来像这样:
export DH_VERBOSE=1
%:
dh $@ --with python3
并debian/control
具有所有常用的内容,包括X-Python3-Version
:
Source: woo
Maintainer: Václav Šmilauer <[email protected]>
Section: python
Priority: optional
Build-Depends: python3-setuptools (>= 0.6b3), python3-all, python3-all-dev, debhelper (>= 7.4.3), libboost-all-dev, pyqt4-dev-tools, libqt4-dev, libqt4-dev-bin, qt4-dev-tools, libgle3-dev, libqglviewer-qt4-dev | libqglviewer-dev, libvtk5-dev, libgts-dev, libeigen3-dev, freeglut3-dev
X-Python3-Version: >= 3.4
Standards-Version: 3.9.1
Package: python3-woo
Architecture: any
Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}, python3-xlrd, python3-xlwt, python3-numpy, python3-matplotlib, python3-colorama, python3-qt4, python3-xlib, python3-genshi, python3-psutil, python3-minieigen, python3-imaging, python3-h5py, python3-lockfile, ipython3, mencoder | libav-tools | ffmpeg, python3-prettytable
Description: Discrete dynamic compuations, esp. granular mechanics (python 3)
...
现在,当我运行时fakeroot debian/rules binary
,setup.py
运行python
而不是python3
,尽管--with python3
:
$ fakeroot debian/rules binary
dh binary --with python3
dh_auto_build
pyversions: missing X(S)-Python-Version in control file, fall back to debian/pyversions
pyversions: missing debian/pyversions file, fall back to supported versions
python setup.py build --force
[...]
有什么问题?
解决方案是将添加--buildsystem=pybuild
到debian/rules
,使其看起来像这样:
%:
dh $@ --with python3 --buildsystem=pybuild
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句