~ubuntu-branches/ubuntu/raring/python-qt4/raring-proposed

« back to all changes in this revision

Viewing changes to .pc/debian_configure_changes.diff/configure.py

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2013-01-07 09:26:35 UTC
  • mfrom: (1.5.13) (4.2.7 experimental)
  • Revision ID: package-import@ubuntu.com-20130107092635-7qcg712heele9p9a
Tags: 4.9.6-1ubuntu1
* Fix compiling Qt Designer plugin with multiarched python.
* Unify build targets across py2 & 3, both now multiarched.
* Enable DEB_BUILD_OPTIONS compliant parallel build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
 
35
35
# Initialise the globals.
36
 
pyqt_version = 0x040905
37
 
pyqt_version_str = "4.9.5"
 
36
pyqt_version = 0x040906
 
37
pyqt_version_str = "4.9.6"
38
38
 
39
 
sip_min_version = 0x040e00
 
39
sip_min_version = 0x040e02
40
40
 
41
41
qt_version = 0
42
42
qt_edition = ""
177
177
    g.add_option("-T", "--no-timestamp", action="store_true", default=False,
178
178
            dest="no_timestamp", help="suppress timestamps in the header "
179
179
            "comments of generated code [default: include timestamps]")
 
180
    g.add_option("--no-deprecated", action="store_false", default=True,
 
181
            dest="with_deprecated", help="disable Qt v4 features deprecated "
 
182
            "in Qt v5 [default: enabled]")
180
183
 
181
184
    if sys.platform != 'win32':
182
185
        if sys.platform.startswith('linux') or sys.platform == 'darwin':
340
343
            0x040702: "Qt_4_7_1",
341
344
            0x040800: "Qt_4_7_2",
342
345
            0x040803: "Qt_4_8_0",
343
 
            0x050000: "Qt_4_8_3",
 
346
            0x040804: "Qt_4_8_3",
 
347
            0x050000: "Qt_4_8_4",
344
348
            0x060000: "Qt_5_0_0"
345
349
        }
346
350
 
378
382
                extra_libs=sql_libs)
379
383
        check_module("QtSvg", "qsvgwidget.h", "new QSvgWidget()")
380
384
        if qt_version < 0x050000: check_module("QtTest", "QtTest", "QTest::qSleep(0)")
381
 
 
382
 
        # Qt v5-beta1 doesn't install the Headers directory for a framework
383
 
        # build of QtWebKit on OS/X.
384
 
        if qt_version >= 0x050000:
385
 
            webkit_inc_dirs = [os.path.join(qt_incdir, "QtWebKit")]
386
 
        else:
387
 
            webkit_inc_dirs = None
388
 
 
389
 
        check_module("QtWebKit", "qwebpage.h", "new QWebPage()",
390
 
                extra_include_dirs=webkit_inc_dirs)
391
 
 
 
385
        check_module("QtWebKit", "qwebpage.h", "new QWebPage()")
392
386
        check_module("QtXml", "qdom.h", "new QDomDocument()")
393
387
 
394
388
        # Qt v5-beta1 causes compiler error messages.  Wait to see if it fixed
538
532
            generate_code("QtTest")
539
533
 
540
534
        if "QtWebKit" in pyqt_modules:
541
 
            # Qt v5-beta1 doesn't install the Headers directory for a framework
542
 
            # build of QtWebKit on OS/X.
543
 
            if qt_version >= 0x050000:
544
 
                webkit_inc_dirs = [os.path.join(qt_incdir, "QtWebKit")]
545
 
            else:
546
 
                webkit_inc_dirs = None
547
 
 
548
 
            generate_code("QtWebKit", extra_include_dirs=webkit_inc_dirs)
 
535
            generate_code("QtWebKit")
549
536
 
550
537
        if "QtXml" in pyqt_modules:
551
538
            generate_code("QtXml")
832
819
                if sipcfg.sip_inc_dir != sipcfg.py_inc_dir:
833
820
                    inc_path.insert(0, sipcfg.sip_inc_dir)
834
821
 
 
822
                if sipcfg.py_conf_inc_dir != sipcfg.py_inc_dir:
 
823
                    inc_path.insert(0, sipcfg.py_conf_inc_dir)
 
824
 
835
825
                if opts.bigqt:
836
826
                    api_dir = "../../_qt"
837
827
                else:
1128
1118
    sipconfig.inform("These PyQt modules will be built: %s." % ", ".join(pyqt_modules))
1129
1119
    sipconfig.inform("The PyQt Python package will be installed in %s." % opts.pyqtmoddir)
1130
1120
 
 
1121
    if opts.with_deprecated:
 
1122
        sipconfig.inform("PyQt is being built with deprecated Qt v4 features")
 
1123
    else:
 
1124
        sipconfig.inform("PyQt is being built without deprecated Qt v4 features")
 
1125
 
1131
1126
    if opts.no_docstrings:
1132
1127
        sipconfig.inform("PyQt is being built without generated docstrings.")
1133
1128
    else:
1531
1526
        qt_sip_flags.append("-x")
1532
1527
        qt_sip_flags.append("VendorID")
1533
1528
 
 
1529
    if not opts.with_deprecated:
 
1530
        qt_sip_flags.append("-x")
 
1531
        qt_sip_flags.append("PyQt_Deprecated_5_0")
 
1532
 
1534
1533
    # Handle the platform tag.
1535
1534
    if sys.platform == 'win32':
1536
1535
        plattag = "WS_WIN"
1773
1772
 
1774
1773
    add_makefile_extras(makefile, extra_include_dirs, extra_lib_dirs, extra_libs)
1775
1774
 
 
1775
    if qt_version >= 0x050000 and opts.with_deprecated:
 
1776
        # The name of this macro is very confusing.
 
1777
        makefile.extra_defines.append('QT_DISABLE_DEPRECATED_BEFORE=0x040900')
 
1778
 
1776
1779
    makefile.generate()
1777
1780
 
1778
1781
 
2149
2152
    out << "PyQt_PrintPreviewWidget\\n";
2150
2153
#endif
2151
2154
 
 
2155
#if defined(QT_NO_RAWFONT)
 
2156
    out << "PyQt_RawFont\\n";
 
2157
#endif
 
2158
 
2152
2159
#if !defined(QT3_SUPPORT) || QT_VERSION >= 0x040200
2153
2160
    out << "PyQt_NoPrintRangeBug\\n";
2154
2161
#endif