Changeset View
Changeset View
Standalone View
Standalone View
devel/py-qt4-core/files/patch-configure.py
--- configure.py.orig 2014-07-03 17:00:02.000000000 +0300 | --- configure.py.orig 2015-06-11 15:28:16 UTC | ||||
+++ configure.py 2014-07-19 23:51:03.000000000 +0300 | +++ configure.py | ||||
@@ -343,7 +343,7 @@ | @@ -338,7 +338,7 @@ class ConfigurePyQt4: | ||||
# Note that the order in which we check is important for the | # Note that the order in which we check is important for the | ||||
# consolidated module - a module's dependencies must be checked first. | # consolidated module - a module's dependencies must be checked first. | ||||
- pyqt_modules.append("QtCore") | - pyqt_modules.append("QtCore") | ||||
+ check_module("QtCore", "qobject.h", "new QObject()") | + check_module("QtCore", "qobject.h", "new QObject()") | ||||
check_module("QtGui", "qwidget.h", "new QWidget()") | check_module("QtGui", "qwidget.h", "new QWidget()") | ||||
check_module("QtHelp", "qhelpengine.h", "new QHelpEngine(\"foo\")") | check_module("QtHelp", "qhelpengine.h", "new QHelpEngine(\"foo\")") | ||||
@@ -372,8 +372,8 @@ | @@ -367,8 +367,8 @@ class ConfigurePyQt4: | ||||
check_module("QtTest", "QtTest", "QTest::qSleep(0)") | check_module("QtTest", "QtTest", "QTest::qSleep(0)") | ||||
check_module("QtWebKit", "qwebpage.h", "new QWebPage()") | check_module("QtWebKit", "qwebpage.h", "new QWebPage()") | ||||
check_module("QtXmlPatterns", "qxmlname.h", "new QXmlName()") | check_module("QtXmlPatterns", "qxmlname.h", "new QXmlName()") | ||||
- check_module("phonon", "phonon/videowidget.h", | - check_module("phonon", "phonon/videowidget.h", | ||||
- "new Phonon::VideoWidget()") | - "new Phonon::VideoWidget()") | ||||
+ check_module("phonon", "phonon/mediacontroller.h", | + check_module("phonon", "phonon/mediacontroller.h", | ||||
+ "new Phonon::MediaController(0)") | + "new Phonon::MediaController(0)") | ||||
check_module("QtAssistant", "qassistantclient.h", | check_module("QtAssistant", "qassistantclient.h", | ||||
"new QAssistantClient(\"foo\")", extra_lib_dirs=ass_lib_dirs, | "new QAssistantClient(\"foo\")", extra_lib_dirs=ass_lib_dirs, | ||||
extra_libs=ass_libs) | extra_libs=ass_libs) | ||||
@@ -635,21 +635,6 @@ | @@ -630,21 +630,6 @@ class ConfigurePyQt4: | ||||
if opts.staticplugins: | if opts.staticplugins: | ||||
sipconfig.inform("Unable to find the following static plugins: %s" % ", ".join(opts.staticplugins)) | sipconfig.inform("Unable to find the following static plugins: %s" % ", ".join(opts.staticplugins)) | ||||
- # Generate the QScintilla API file. | - # Generate the QScintilla API file. | ||||
- sipconfig.inform("Creating QScintilla API file...") | - sipconfig.inform("Creating QScintilla API file...") | ||||
- f = open("PyQt4.api", "w") | - f = open("PyQt4.api", "w") | ||||
- | - | ||||
- for m in pyqt_modules: | - for m in pyqt_modules: | ||||
- api = open(m + ".api") | - api = open(m + ".api") | ||||
- | - | ||||
- for l in api: | - for l in api: | ||||
- f.write("PyQt4." + l) | - f.write("PyQt4." + l) | ||||
- | - | ||||
- api.close() | - api.close() | ||||
- os.remove(m + ".api") | - os.remove(m + ".api") | ||||
- | - | ||||
- f.close() | - f.close() | ||||
- | - | ||||
def _qpy_directories(self, mname, lib_name): | def _qpy_directories(self, mname, lib_name): | ||||
"""Return a 3-tuple of the directories containing the header files, the | """Return a 3-tuple of the directories containing the header files, the | ||||
directory containing the library, and the name of the support library | directory containing the library, and the name of the support library | ||||
@@ -740,6 +725,9 @@ | @@ -735,6 +720,9 @@ class ConfigurePyQt4: | ||||
return libs, libdirs | return libs, libdirs | ||||
def module_installs(self): | def module_installs(self): | ||||
+ if "QtCore" not in pyqt_modules: | + if "QtCore" not in pyqt_modules: | ||||
+ return [] | + return [] | ||||
+ | + | ||||
return [os.path.join(src_dir, "__init__.py"), "pyqtconfig.py"] | return [os.path.join(src_dir, "__init__.py"), "pyqtconfig.py"] | ||||
def qpy_libs(self): | def qpy_libs(self): | ||||
@@ -875,80 +863,82 @@ | @@ -870,80 +858,82 @@ include(%s) | ||||
makefile.generate() | makefile.generate() | ||||
tool.append("elementtree") | tool.append("elementtree") | ||||
- # Create the pyuic4 wrapper. Use the GUI version on MacOS (so that | - # Create the pyuic4 wrapper. Use the GUI version on MacOS (so that | ||||
- # previews work properly and normal console use will work anyway), but | - # previews work properly and normal console use will work anyway), but | ||||
- # not on Windows (so that normal console use will work). | - # not on Windows (so that normal console use will work). | ||||
- sipconfig.inform("Creating pyuic4 wrapper...") | - sipconfig.inform("Creating pyuic4 wrapper...") | ||||
+ if "QtCore" in pyqt_modules: | + if "QtCore" in pyqt_modules: | ||||
▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | |||||
- console=1, | - console=1, | ||||
- qt=["QtCore", "QtXml"], | - qt=["QtCore", "QtXml"], | ||||
- debug=opts.debug, | - debug=opts.debug, | ||||
- warnings=1, | - warnings=1, | ||||
- universal=sipcfg.universal, | - universal=sipcfg.universal, | ||||
- arch=sipcfg.arch, | - arch=sipcfg.arch, | ||||
- deployment_target=sipcfg.deployment_target | - deployment_target=sipcfg.deployment_target | ||||
- ) | - ) | ||||
- | |||||
- makefile.extra_include_dirs.append(os.path.join(src_dir, "pylupdate")) | |||||
- | |||||
- if cxxflags_app != "": | |||||
- makefile.extra_cxxflags.append(cxxflags_app) | |||||
- | |||||
- makefile.generate() | |||||
- tool.append("pylupdate") | |||||
- | |||||
- sipconfig.inform("Creating pyrcc4 Makefile...") | |||||
+ makefile = sipconfig.ProgramMakefile( | + makefile = sipconfig.ProgramMakefile( | ||||
+ configuration=sipcfg, | + configuration=sipcfg, | ||||
+ build_file=os.path.join(src_dir, "pylupdate", "pylupdate.sbf"), | + build_file=os.path.join(src_dir, "pylupdate", "pylupdate.sbf"), | ||||
+ dir="pylupdate", | + dir="pylupdate", | ||||
+ install_dir=opts.pyqtbindir, | + install_dir=opts.pyqtbindir, | ||||
+ console=1, | + console=1, | ||||
+ qt=["QtCore", "QtXml"], | + qt=["QtCore", "QtXml"], | ||||
+ debug=opts.debug, | + debug=opts.debug, | ||||
+ warnings=1, | + warnings=1, | ||||
+ universal=sipcfg.universal, | + universal=sipcfg.universal, | ||||
+ arch=sipcfg.arch, | + arch=sipcfg.arch, | ||||
+ deployment_target=sipcfg.deployment_target | + deployment_target=sipcfg.deployment_target | ||||
+ ) | + ) | ||||
+ | |||||
- makefile.extra_include_dirs.append(os.path.join(src_dir, "pylupdate")) | |||||
+ makefile.extra_include_dirs.append(os.path.join(src_dir, "pylupdate")) | + makefile.extra_include_dirs.append(os.path.join(src_dir, "pylupdate")) | ||||
+ | |||||
- if cxxflags_app != "": | |||||
- makefile.extra_cxxflags.append(cxxflags_app) | |||||
+ if cxxflags_app != "": | + if cxxflags_app != "": | ||||
+ makefile.extra_cxxflags.append(cxxflags_app) | + makefile.extra_cxxflags.append(cxxflags_app) | ||||
+ | |||||
- makefile.generate() | |||||
- tool.append("pylupdate") | |||||
+ makefile.generate() | + makefile.generate() | ||||
+ tool.append("pylupdate") | + tool.append("pylupdate") | ||||
- makefile = pyrccMakefile() | - sipconfig.inform("Creating pyrcc4 Makefile...") | ||||
+ sipconfig.inform("Creating pyrcc4 Makefile...") | + sipconfig.inform("Creating pyrcc4 Makefile...") | ||||
- makefile = pyrccMakefile() | |||||
+ makefile = pyrccMakefile() | |||||
- if cxxflags_app != "": | - if cxxflags_app != "": | ||||
- makefile.extra_cxxflags.append(cxxflags_app) | - makefile.extra_cxxflags.append(cxxflags_app) | ||||
+ makefile = pyrccMakefile() | + if cxxflags_app != "": | ||||
+ makefile.extra_cxxflags.append(cxxflags_app) | |||||
- makefile.generate() | - makefile.generate() | ||||
- tool.append("pyrcc") | - tool.append("pyrcc") | ||||
+ if cxxflags_app != "": | |||||
+ makefile.extra_cxxflags.append(cxxflags_app) | |||||
+ | |||||
+ makefile.generate() | + makefile.generate() | ||||
+ tool.append("pyrcc") | + tool.append("pyrcc") | ||||
if opts.designer_plugin and "QtDesigner" in pyqt_modules: | if opts.designer_plugin and "QtDesigner" in pyqt_modules: | ||||
py_major = sipcfg.py_version >> 16 | py_major = sipcfg.py_version >> 16 | ||||
@@ -2301,9 +2285,9 @@ | @@ -2284,9 +2274,9 @@ def main(): | ||||
installs=[(pyqt.module_installs(), pyqt_modroot)] | installs=[(pyqt.module_installs(), pyqt_modroot)] | ||||
if opts.api: | if opts.api: | ||||
- installs.append(("PyQt4.api", os.path.join(opts.qscidir, "api", "python"))) | - installs.append(("PyQt4.api", os.path.join(opts.qscidir, "api", "python"))) | ||||
+ installs.append(("%s.api" % pyqt_modules[-1], os.path.join(opts.qscidir, "api", "python"))) | + installs.append(("%s.api" % pyqt_modules[-1], os.path.join(opts.qscidir, "api", "python"))) | ||||
- xtra_modules = ["Qt"] | - xtra_modules = ["Qt"] | ||||
+ xtra_modules = [] | + xtra_modules = [] | ||||
if opts.bigqt: | if opts.bigqt: | ||||
xtra_modules.append("_qt") | xtra_modules.append("_qt") |