Python 3.0.1 and mingw

Kay Schluehr kay at fiber-space.de
Tue Jun 23 23:06:16 EDT 2009


On 24 Jun., 00:59, smartmobili <v.richo... at gmail.com> wrote:
> I wanted to know if you have some patch to compile python 3.x on mingw
> platform because I found some
> but doesn't work very well :
>
>     make
>
> gcc   -o python.exe \
> Modules/python.o \
> libpython3.0.a    -lm
> Could not find platform independent libraries <prefix>
> Could not find platform dependent libraries <exec_prefix>
> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> Fatal Python error: Py_Initialize: can't initialize sys standard
> streams
> ImportError: No module named encodings.utf_8
>
> I have some questions about posixmodule.c, config.c and makesetup,
> I can see in posixmodule that you define a INITFUNC like this :
>
> #if (defined(_MSC_VER) || defined(__WATCOMC__) || defined
> (__BORLANDC__)) &&
> !defined(__QNX__)
> #define INITFUNC PyInit_nt
> #define MODNAME "nt"
>
> #elif defined(PYOS_OS2)
> #define INITFUNC PyInit_os2
> #define MODNAME "os2"
>
> #else
> #define INITFUNC PyInit_posix
> #define MODNAME "posix"
> #endif
>
> So first I tried to add || defined(____MINGW32____) to declare a
> PyInit_nt
> but after config.c
> was still using PyInit_posix. How does makesetup choose to include one
> function or another ?
> So finally python is using PyInit_posix...
>
> and after any idea why I got the compilation error ?

Why on earth do you want to compile Python 3.0.1?



More information about the Python-list mailing list