From c2341ff213e673839de23fac5769c6c141c3f1ec Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Thu, 21 Jun 2018 22:18:17 +0200 Subject: [PATCH] WIP: speedup for CI development, fixed deb package (python needs to be part of dependency), fixed gcc build with Python3 --- scripts/makedeb.sh | 7 ++++--- scripts/rpm-data/klayout.spec | 3 ++- src/pymod/pymodHelper.h | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/makedeb.sh b/scripts/makedeb.sh index c6b51ac47..fa9bbc60f 100755 --- a/scripts/makedeb.sh +++ b/scripts/makedeb.sh @@ -19,10 +19,10 @@ fi # TODO: derive this list automatically? case $target in ubuntu16) - depends="libqt4-designer (>= 4.8.6), libqt4-xml (>= 4.8.6), libqt4-sql (>= 4.8.6), libqt4-network (>= 4.8.6), libqtcore4 (>= 4.8.6), libqtgui4 (>= 4.8.6), zlib1g (>= 1.2.8), libruby2.3 (>= 2.3.1), libpython3.5 (>= 3.5.1), libstdc++6 (>= 4.6.3), libc6 (>= 2.15)" + depends="libqt4-designer (>= 4.8.6), libqt4-xml (>= 4.8.6), libqt4-sql (>= 4.8.6), libqt4-network (>= 4.8.6), libqtcore4 (>= 4.8.6), libqtgui4 (>= 4.8.6), zlib1g (>= 1.2.8), libruby2.3 (>= 2.3.1), python3 (>= 3.5.1), libpython3.5 (>= 3.5.1), libstdc++6 (>= 4.6.3), libc6 (>= 2.15)" ;; ubuntu18) - depends="libqt4-designer (>= 4.8.7), libqt4-xml (>= 4.8.7), libqt4-sql (>= 4.8.7), libqt4-network (>= 4.8.7), libqtcore4 (>= 4.8.7), libqtgui4 (>= 4.8.7), zlib1g (>= 1.2.11), libruby2.5 (>= 2.5.1), libpython3.6 (>= 3.6.5), libstdc++6 (>= 8), libc6 (>= 2.27)" + depends="libqt4-designer (>= 4.8.7), libqt4-xml (>= 4.8.7), libqt4-sql (>= 4.8.7), libqt4-network (>= 4.8.7), libqtcore4 (>= 4.8.7), libqtgui4 (>= 4.8.7), zlib1g (>= 1.2.11), libruby2.5 (>= 2.5.1), python3 (>= 3.6.5), libpython3.6 (>= 3.6.5), libstdc++6 (>= 8), libc6 (>= 2.27)" ;; *) echo "Unknown target '$target' (given as first argument)" @@ -53,10 +53,11 @@ libdir="usr/lib/klayout" # TODO: is there a better way to produce this path? pylibdir="usr/lib/python3/dist-packages/klayout" +# @@@ TODO: remove -without-qtbinding ./build.sh -j2 \ -bin $bininstdir \ -build $builddir \ - -rpath /$libdir + -rpath /$libdir -without-qtbinding if [ "$bits" = "32" ]; then arch="i386" diff --git a/scripts/rpm-data/klayout.spec b/scripts/rpm-data/klayout.spec index af30ff328..2ef4b4e6b 100644 --- a/scripts/rpm-data/klayout.spec +++ b/scripts/rpm-data/klayout.spec @@ -92,10 +92,11 @@ cd %{git_source} %else cd %{_sourcedir} %endif +# @@@ remove -without-qtbinding ./build.sh -rpath %{_libdir}/klayout \ -bin %{_builddir}/bin.$TARGET \ -build %{_builddir}/build.$TARGET \ - %{buildopt} + %{buildopt} -without-qtbinding cp -p LICENSE Changelog CONTRIB %{_builddir} strip %{_builddir}/bin.$TARGET/*.so diff --git a/src/pymod/pymodHelper.h b/src/pymod/pymodHelper.h index 12f5f2fdc..0c921c3f9 100644 --- a/src/pymod/pymodHelper.h +++ b/src/pymod/pymodHelper.h @@ -63,9 +63,9 @@ module_init (const char *mod_name, const char *mod_description) #if PY_MAJOR_VERSION < 3 #define DEFINE_PYMOD(__name__, __name_str__, __description__) \ - PyMODINIT_FUNC \ + extern "C" \ DEF_INSIDE_PUBLIC \ - init##__name__ () \ + void init##__name__ () \ { \ module_init (__name_str__, __description__); \ } \ @@ -73,9 +73,9 @@ module_init (const char *mod_name, const char *mod_description) #else #define DEFINE_PYMOD(__name__, __name_str__, __description__) \ - PyMODINIT_FUNC \ + extern "C" \ DEF_INSIDE_PUBLIC \ - PyInit_##__name__ () \ + PyObject *PyInit_##__name__ () \ { \ return module_init (__name_str__, __description__); \ } \