gpt4 book ai didi

pyqt - 如何使用 buildout 构建 Qt、PyQt 和 SIP?

转载 作者:行者123 更新时间:2023-12-04 21:24:21 29 4
gpt4 key购买 nike

编辑:
以下 buildout.cfg 用于构建 Qt、PyQt 和 SIP


[buildout]
parts =
pyqt

[pyqt]
recipe = zc.recipe.cmmi
url = http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-4.8.4.tar.gz
#shared = True
source-directory-contains = configure.py
configure-command = ${buildout:executable} ./configure.py
configure-options = --confirm-license
-q ${qt:location}/bin/qmake
-b ${buildout:parts-directory}/pyqt/bin
-p ${buildout:parts-directory}/pyqt/plugins
-d ${buildout:parts-directory}/pyqt/lib/
-v ${sip:location}/share
--verbose
environment =
PYTHONPATH=${sip:location}/lib


[sip]
recipe = zc.recipe.cmmi
url = http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.12.3.tar.gz
# shared = True
source-directory-contains = configure.py
configure-command = ${buildout:executable} ./configure.py
configure-options =
-b ${buildout:parts-directory}/sip/bin
-e ${buildout:parts-directory}/sip/include
-d ${buildout:parts-directory}/sip/lib
-v ${buildout:parts-directory}/sip/share

[qt]
recipe = zc.recipe.cmmi
url = http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.3.tar.gz
shared = True

最佳答案

我怀疑您需要告诉 PyQT 配置在哪里可以找到 sip 库并包含 header :

[pyqt]
recipe = zc.recipe.cmmi
url = http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-4.8.4.tar.gz
# shared = True
source-directory-contains = configure.py
configure-command = ${buildout:executable} ./configure.py
configure-options = --confirm-license
-b ${buildout:parts-directory}/pyqt/bin
-p ${buildout:parts-directory}/pyqt/plugins
-d ${buildout:parts-directory}/pyqt/lib/
-q ${qt:location}/bin/qmake
-v ${sip:location}/share
--verbose
environment =
PYTHONPATH=${sip:location}/lib

更新 :更新我的答案以包含 PYTHONPATH 环境变量所以 configure.py将加载正确的 sipconfig 模块。

关于pyqt - 如何使用 buildout 构建 Qt、PyQt 和 SIP?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6156301/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com