Some refactoring to fix qmake-based pymod builds

- Unify structure of Python module sources so the pymod.pri can be used for all modules
- switch to tlcore, dbcore and rdbcore + distutils_src wrapper modules
This commit is contained in:
Matthias Koefferlein 2018-10-22 20:53:49 +02:00
parent 3074f05e97
commit b80ce12c12
6 changed files with 29 additions and 3 deletions

View File

@ -1,5 +1,6 @@
TARGET = db
TARGET = dbcore
REALMODULE = db
include($$PWD/../pymod.pri)

View File

@ -48,3 +48,25 @@ msvc {
lib_target.extra = $(INSTALL_PROGRAM) $$DESTDIR_PYMOD/$${TARGET}$${PYTHONEXTSUFFIX} $(INSTALLROOT)$$PREFIX/pymod/klayout
}
INSTALLS = lib_target
!equals(REALMODULE, "") {
msvc {
QMAKE_POST_LINK += && $(MKDIR) $$shell_path($$DESTDIR_PYMOD/$$REALMODULE) && $(COPY) $$shell_path($$PWD/distutils_src/klayout/$$REALMODULE/*) $$shell_path($$DESTDIR_PYMOD/$$REALMODULE)
} else {
QMAKE_POST_LINK += && $(MKDIR) $$DESTDIR_PYMOD/$$REALMODULE && $(COPY) $$PWD/distutils_src/klayout/$$REALMODULE/* $$DESTDIR_PYMOD/$$REALMODULE
}
# INSTALLS needs to be inside a lib or app templates.
modsrc_target.path = $$PREFIX/pymod/klayout/$$REALMODULE
# This would be nice:
# init_target.files += $$DESTDIR_PYMOD/$$REALMODULE/*
# but some Qt versions need this explicitly:
msvc {
modsrc_target.extra = $(INSTALL_PROGRAM) $$shell_path($$DESTDIR_PYMOD/$$REALMODULE/*) $$shell_path($(INSTALLROOT)$$PREFIX/pymod/klayout/$$REALMODULE)
} else {
modsrc_target.extra = $(INSTALL_PROGRAM) $$DESTDIR_PYMOD/* $(INSTALLROOT)$$PREFIX/pymod/klayout/$$REALMODULE
}
INSTALLS += modsrc_target
}

View File

@ -1,5 +1,6 @@
TARGET = rdb
TARGET = rdbcore
REALMODULE = rdb
include($$PWD/../pymod.pri)

View File

@ -1,5 +1,6 @@
TARGET = tl
TARGET = tlcore
REALMODULE = tl
include($$PWD/../pymod.pri)
@ -41,3 +42,4 @@ msvc {
init_target.extra = $(INSTALL_PROGRAM) $$DESTDIR_PYMOD/__init__.py $(INSTALLROOT)$$PREFIX/pymod/klayout
}
INSTALLS += init_target