From: Chris L. <cli...@gm...> - 2004-07-31 19:18:46
|
Brian Dorsey wrote: > On Wed, 28 Jul 2004 20:18:48 +0200, Thomas Heller <th...@py...> wrote: > >>So far, here are the ideas. >> >>First, prebuilt exe stubs can be provided by the py2exe installer, >>which would contain most of the standard extensions distributed by the >>python.org installer (plus _ctypes, of course ;-). But this wouldn't >>allow using the pywin32 extensions, for example - unless some kind soul >>builds all of them into the exe stubs as well. > > Sounds good for the most common cases. > > >>Second, the exe stubs could be built (if a C compiler is installed) at >>runtime when py2exe runs. py2exe would collect the extension modules >>needed, build a config.c file at runtime, and compiles this, linking to >>static libraries of pywin32, wxPython, or whatever. > > I'm not much of a C guy... but if the setup instructions were clear, > I'd probably make an attempt to get this going. On the other hand... > if this system existed, could someone who did have a compiler all > setup properly build them and make them available to me using the > first option? using a C compiler with distutils is realy easy. getting hands on a free C compiler isn't that complicated neither. tough i dont have seen a all in once installer. there are two impls of GCC: - http://mingw.org/ get gcc, binutils and the windows api files, make sure it's install location is in the $PATH variable (thats the small variant if you just want a compiler) - http://cygwin.com/ get setup.exe, run it. then select "install from internet" select devel/gcc mingw and binutils packages. (this is the larger variant, gcc installs a lot of un*x compatibily tools too and it provides a POSIX emulation. it also has it's own python version, you don't need that usualy) then to compile and install extensions (in both cases) use python setup.py build --compiler=mingw32 install as long as you dont need to debug broken packages, you probably don't even care if there is a C compiler running or not.. when py2exe would use the distutils stuff to run the compiler i wouldn't see a problem to compile custom exe stubs for "non-C" people. some time ago, i have once played around using distutils to create custom DLLs with an embedded python interpreter. i had to implement a custom distutils command (a variant of the extensions builder), but that's no problem, thats the same that py2exe does :-) maybe it would be helpful if there was a all in one installer for the gcc compiler, so that one does not have to get several archives. but i think the compiler and py2exe should be separate, as some people would like to use other compilers for some reasons (strange reasons ;-) and not everyone needs the compiler and it adds quite some bytes to the download size. chris |