@@@ cython and python 3 wip
[mLib-python] / setup.py
index 1ec65dc..bc0c2d5 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -22,18 +22,20 @@ mLib = DC.Extension('mLib', [pyxc,
 ## The `cythonize' function generates the C sources immediately, so we have
 ## to generate its inputs even earlier.
 genfiles = [
-#            MS.Derive('base64.pyx', 'codec.pyx.in',
-#                      {'CLASS': 'Base64', 'PREFIX': 'base64'}),
-#            MS.Derive('base32.pyx', 'codec.pyx.in',
-#                      {'CLASS': 'Base32', 'PREFIX': 'base32'}),
-#            MS.Derive('hex.pyx', 'codec.pyx.in',
-#                      {'CLASS': 'Hex', 'PREFIX': 'hex'})
+            MS.Derive('base64.pyx', 'codec.pyx.in',
+                      {'CLASS': 'Base64', 'PREFIX': 'base64'}),
+            MS.Derive('base32.pyx', 'codec.pyx.in',
+                      {'CLASS': 'Base32', 'PREFIX': 'base32'}),
+            MS.Derive('hex.pyx', 'codec.pyx.in',
+                      {'CLASS': 'Hex', 'PREFIX': 'hex'})
 ]
 for g in genfiles: g.gen()
 
 ## Generate the main C code.
 if OS.path.exists(pyxc): OS.rename(pyxc, "mLib.c")
-CB.cythonize("mLib.pyx", compile_time_env = dict(PYVERSION = PYVERSION))
+CB.cythonize("mLib.pyx",
+             compile_time_env = dict(PYVERSION = PYVERSION),
+             compiler_directives = dict(c_string_encoding = 'utf8'))
 OS.rename("mLib.c", pyxc)
 
 MS.setup(name = 'mLib-python',