From 0eff99871ac78019da5de6f40c4c7ad629cf70f7 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Mon, 23 Mar 2015 10:59:57 +0900 Subject: [PATCH] Updates for building and bundling with Python3 Note that building currently requires bouncing back and forth between python2 and python3. --- mac/Pillow-tk-setup.patch | 14 ++++++++++++++ mac/gramps.bundle | 23 +++++++---------------- mac/gramps.launcher | 4 ++-- mac/gramps.modules | 14 +++++++++----- 4 files changed, 32 insertions(+), 23 deletions(-) create mode 100644 mac/Pillow-tk-setup.patch diff --git a/mac/Pillow-tk-setup.patch b/mac/Pillow-tk-setup.patch new file mode 100644 index 000000000..a9ad280c5 --- /dev/null +++ b/mac/Pillow-tk-setup.patch @@ -0,0 +1,14 @@ +diff -c /Users/john/Development/gtk-sources/Pillow-2.7.0/setup.py\~ /Users/john/Development/gtk-sources/Pillow-2.7.0/setup.py +--- a/setup.py Fri Jan 2 03:52:21 2015 ++++ b/setup.py Sun Mar 22 14:54:09 2015 +@@ -575,7 +575,7 @@ + exts.append(Extension( + "PIL._webp", ["_webp.c"], libraries=libs, define_macros=defs)) + +- if sys.platform == "darwin": ++ if _tkinter and sys.platform == "darwin": + # locate Tcl/Tk frameworks + frameworks = [] + framework_roots = [ + +Diff finished. Sun Mar 22 20:37:52 2015 diff --git a/mac/gramps.bundle b/mac/gramps.bundle index 9fe2a1e54..dc952ee37 100644 --- a/mac/gramps.bundle +++ b/mac/gramps.bundle @@ -35,11 +35,6 @@ ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/immodules/im-quartz.so - - - ${prefix}/lib/gtk-3.0/${pkg:${gtk}:gtk_binary_version}/theming-engines/*.so - - ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/printbackends/*.so @@ -50,7 +45,7 @@ - ${prefix}/lib/python2.7/*.so + ${prefix}/lib/python3.4/*.so @@ -62,7 +57,7 @@ - ${prefix}/lib/libgtkmacintegration.2.dylib + ${prefix}/lib/libgtkmacintegration-gtk3.2.dylib @@ -90,7 +85,7 @@ - ${prefix}/lib/libtiff.3.dylib + ${prefix}/lib/libtiff.5.dylib @@ -145,19 +140,15 @@ - ${prefix}/lib/python2.7/*.py + ${prefix}/lib/python3.4/*.py - ${prefix}/lib/python2.7/config/ + ${prefix}/lib/python3.4/config-3.4m/ - ${prefix}/lib/python2.7/site-packages/gramps/gen/utils/resource-path - - - - ${prefix}/include/python2.7/pyconfig.h + ${prefix}/lib/python3.4/site-packages/gramps/gen/utils/resource-path @@ -177,7 +168,7 @@ - ${prefix}/lib/python2.7/site-packages/gramps/*.glade + ${prefix}/lib/python3.4/site-packages/gramps/*.glade diff --git a/mac/gramps.launcher b/mac/gramps.launcher index 949730c94..8d7466d21 100755 --- a/mac/gramps.launcher +++ b/mac/gramps.launcher @@ -23,7 +23,7 @@ export GTK_PATH="$bundle_res" export PANGO_RC_FILE="$bundle_etc/pango/pangorc" export PANGO_SYSCONFDIR="$bundle_etc" export PANGO_LIBDIR="$bundle_lib" -export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-3.0/gdk-pixbuf.loaders" +export GDK_PIXBUF_MODULE_FILE="$bundle_lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" if [ `uname -r | cut -d . -f 1` -ge 10 ]; then export GTK_IM_MODULE_FILE="$bundle_etc/gtk-3.0/gtk.immodules" fi @@ -32,7 +32,7 @@ export GVBINDIR="$bundle_lib/graphviz" #Set $PYTHON to point inside the bundle -PYVER=2.7 +PYVER=3.4 export PYTHON="$bundle_contents/MacOS/python" export PYTHONHOME="$bundle_res" diff --git a/mac/gramps.modules b/mac/gramps.modules index 81ee1dc0f..143fb2e7e 100644 --- a/mac/gramps.modules +++ b/mac/gramps.modules @@ -54,14 +54,14 @@ gtk-mac-bundler gtk-osx-build/projects/gramps/gramps.bundle --> - - + + - + @@ -144,8 +144,12 @@ gtk-mac-bundler gtk-osx-build/projects/gramps/gramps.bundle - - + + +