WIP: include __init__.py generation in .pro files.

This commit is contained in:
Matthias Koefferlein 2018-06-03 13:05:12 +02:00
parent d903c9f224
commit f093b305bf
5 changed files with 59 additions and 21 deletions

View File

@ -0,0 +1,5 @@
# pykl library definition file
__all__ = [ "tl", "db", "lay" ]

View File

@ -0,0 +1,5 @@
# pykl library definition file
__all__ = [ "tl", "db", "lay", "QtCore", "QtGui", "QtXml", "QtSql", "QtNetwork", "QtDesigner" ]

View File

@ -0,0 +1,7 @@
# pykl library definition file
__all__ = [ "tl", "db", "lay",
"QtCore", "QtGui", "QtNetwork", "QtSql", "QtWidgets", "QtDesigner",
"QtMultimedia", "QtPrintSupport", "QtSvg", "QtXmlPatterns", "QtXml" ]

View File

@ -9,3 +9,22 @@ SOURCES = \
HEADERS += \
LIBS += -lklayout_lay
# Use this opportunity to provide the __init__.py file
equals(HAVE_QTBINDINGS, "1") {
equals(HAVE_QT5, "1") {
INIT_PY = $$PWD/../__init__.py.qt5
} else {
INIT_PY = $$PWD/../__init__.py.qt4
}
} else {
INIT_PY = $$PWD/../__init__.py.noqt
}
QMAKE_POST_LINK += && $(COPY) $$INIT_PY $$DESTDIR/../pykl/__init__.py
# INSTALLS needs to be inside a lib or app templates.
init_target.path = $$PREFIX/pykl/__init__.py
init_target.files += $$INIT_PY
INSTALLS += init_target

View File

@ -5,29 +5,31 @@ SUBDIRS = \
tl \
lay \
equals(HAVE_QT5, "1") {
equals(HAVE_QTBINDINGS, "1") {
equals(HAVE_QT5, "1") {
SUBDIRS += \
QtCore \
QtGui \
QtNetwork \
QtSql \
QtWidgets \
QtDesigner \
QtMultimedia \
QtPrintSupport \
QtSvg \
QtXmlPatterns \
QtXml
SUBDIRS += \
QtCore \
QtGui \
QtNetwork \
QtSql \
QtWidgets \
QtDesigner \
QtMultimedia \
QtPrintSupport \
QtSvg \
QtXmlPatterns \
QtXml
} else {
} else {
SUBDIRS += \
QtCore \
QtGui \
QtXml \
QtSql \
QtNetwork \
QtDesigner
SUBDIRS += \
QtCore \
QtGui \
QtXml \
QtSql \
QtNetwork \
QtDesigner
}
}