-DC.setup(name = 'mLib-python',
- version = MS.auto_version(),
+## 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'})
+]
+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))
+OS.rename("mLib.c", pyxc)
+
+MS.setup(name = 'mLib-python',