首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >debhelper指示使用python3,但使用python2运行setup.py

debhelper指示使用python3,但使用python2运行setup.py
EN

Stack Overflow用户
提问于 2015-02-24 13:21:43
回答 1查看 2.2K关注 0票数 3

我很难用dh为python 3(而不是python 2)创建包。我使用setup.py,当与python3一起调用时,它是为python3构建的,我为py3k有一个单独的debian目录,所以我只想为该版本构建。

debian/rules看起来是这样的:

代码语言:javascript
复制
export DH_VERBOSE=1
%:
    dh $@ --with python3

debian/control有所有常见的东西,包括X-Python3-Version

代码语言:javascript
复制
Source: woo
Maintainer: Václav Šmilauer <eu@doxos.eu>
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

代码语言:javascript
复制
$ 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
[...]

有什么问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-02-24 15:43:08

解决方案是将--buildsystem=pybuild添加到debian/rules中,这样看起来如下所示:

代码语言:javascript
复制
%:
    dh $@ --with python3 --buildsystem=pybuild
票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28696938

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档