[I18n-sig] iconv codec

Tamito KAJIYAMA kajiyama@grad.sccs.chukyo-u.ac.jp
Wed, 10 Jan 2001 17:32:44 +0900


Martin v. Loewis wrote:
|
| > SystemError: new style getargs format but argument is not a tuple
| > >>> 
| > 
| > What goes wrong?
| 
| Thanks for the report. Iconv_iconv should have used
| METH_VARARGS|METH_KEYWORDS, but was using only METH_KEYWORDS. Please
| update your tree and try again. I don't know why this was no problem
| with the CVS Python.

It works both with glibc-2.1.2 and with libiconv-1.5.1.  Thanks.

FYI: I've modified setup.py in the following way to build the
iconv codec with an old libc5 and libiconv.  Two iconv libraries
are statically linked so that iconvmodule.so can be imported
without relying on the LD_LIBRARY_PATH environment variable.
The prefix /opt/libiconv-1.5.1 should be changed appropriately.
I could not figure out a way to achieve the same things without
modifying the setup.py script (possible?).

--- setup.py.orig	Wed Jan 10 08:50:56 2001
+++ setup.py	Wed Jan 10 09:01:22 2001
@@ -14,6 +14,9 @@
 """,
 
        py_modules = ['iconvcodec'],
-       ext_modules = [Extension("iconv",sources=["iconvmodule.c"])]
+       ext_modules = [Extension("iconv",sources=["iconvmodule.c"],
+                                include_dirs=["/opt/libiconv-1.5.1/include"],
+                                extra_objects=["/opt/libiconv-1.5.1/lib/libiconv.a",
+                                               "/opt/libiconv-1.5.1/lib/libcharset.a"])]
        )
 
Regards,

-- 
KAJIYAMA, Tamito <kajiyama@grad.sccs.chukyo-u.ac.jp>