You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2012/08/01 13:24:06 UTC

[Bug 115780] filter: Python Script pyAltFCFGMerge updated to run under Python 3.1.2

https://issues.apache.org/ooo/show_bug.cgi?id=115780

--- Comment #6 from hanya <ha...@gmail.com> ---
Created attachment 78802
  --> https://issues.apache.org/ooo/attachment.cgi?id=78802&action=edit
To support both python2.7 and python3

This patch contains attached patch provided by p9w.vu.31122010. 
"encoding" keyword argument of open() function can not be passed on Python 2.X. 
Default ascii codec of Python (3.X) does not allow multi-byte characters for
text mode. 
The patch contains version check of Python and conditions around open()
function.
I tried to build with Python 2.7.3 and Python 3.3.0b1 using hacked makefile
like as follows.

# svn diff filter/source/config/fragments/makefile.mk 
Index: filter/source/config/fragments/makefile.mk
===================================================================
--- filter/source/config/fragments/makefile.mk    (revision 1367534)
+++ filter/source/config/fragments/makefile.mk    (working copy)
@@ -183,7 +183,9 @@
 MERGE:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/python
../tools/merge/pyAltFCFGMerge
 .ENDIF
 .ELSE
-MERGE    := $(JAVAI) $(JAVAIFLAGS) -jar $(SOLARBINDIR)$/FCFGMerge.jar
+#MERGE    := $(JAVAI) $(JAVAIFLAGS) -jar $(SOLARBINDIR)$/FCFGMerge.jar
+MERGE:=/usr/local/bin/python3.3 ../tools/merge/pyAltFCFGMerge
+#MERGE:=python ../tools/merge/pyAltFCFGMerge
 .ENDIF

 PACKLANG := $(XSLTPROC) --nonet

The format() method of string is introduced on Python 2.6, so this patch
requires version 2.6.

-- 
You are receiving this mail because:
You are on the CC list for the bug.