[Python-Dev] python-dev Summary for 2004-07-16 through 2004-07-31 [draft]

Nick Coghlan ncoghlan at iinet.net.au
Sat Aug 7 00:55:51 CEST 2004


Brett Cannon wrote:

> ------------------------------------------------------------------------------------------------------------------------------------------ 
> 
> How to get Python to compile with Microsoft's free compiler that should 
> just come with the OS standard
> ------------------------------------------------------------------------------------------------------------------------------------------ 
> 
> 1. Download the free .NET compiler
> 2. Download the Windows SDK (at 
> http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ with only IE)
> 3. Download Garth's tools to generate a Makefile from the .sln files (at 
> http://mail.python.org/pipermail/python-dev/2004-February/042595.html )
> 4. Compile
> 5. Realize you should be using an OS that doesn't make you go through 
> this many hoops just to have a compiler for your platform
> 
> Contributing threads:
>   - `Non-Visual Studio builds on Windows XP? 
> <http://mail.python.org/pipermail/python-dev/2004-July/046324.html>`__

Actually, step 4 is more complicated than that ;)

Which was why I abandoned it at that point. . . and then discovered that
  my laptop's modem and built-in wireless don't work properly in Linux,
unless I feel like paying for the Linuxant drivers, or getting coLinux
to work (I'm partway through the latter with Fedora Core 3, since there
won't be Linuxant drivers for Core 3 until it gets released).

So. . .

4a. Get MINGW, since Garth's tool uses make, not nmake. Either that, or
write the nmake makefile generation module for Garth's tool. Guess which
one is likely to be less work ;) (especially since I already had mingw)

4b. Edit the .vcproj files and the .py files in Garth's tool to remove
all references to 'odbc32.lib' and 'odbccp32.lib', since the free tools
don't have those, and Python doesn't seem to actually need them (Visual
Studio links to them by default).

4c. In gnu_make.py, line 49, change it to be:
        write(escape(makedef['all']))
   (The version in the python-dev is missing the escape, which meant
make couldn't match up the targets properly)

4d. Run Garth's tool to generate your makefiles for either debug or release.

4e. Set up a build environment with PATH, INCLUDE and LIB set correctly

4f. Run 'make -f pcbuild.gnu.mak python'

4g. Try to run the tests, and see the following:
C:\DEVELO~1\projects\python\dist\src\PCbuild>python ..\PC\testpy.py
'import site' failed; use -v for traceback
Traceback (most recent call last):
   File "..\PC\testpy.py", line 31, in ?
     import regrtest # Standard Python tester.
   File "C:\DEVELO~1\projects\python\dist\src\lib\test\regrtest.py", line
  126, in ?
     from test import test_support
   File "C:\DEVELO~1\projects\python\dist\src\lib\test\test_support.py",
line 154, in ?
     TESTFN_UNICODE_UNENCODEABLE.encode("Latin1")
   File "C:\development\projects\python\dist\src\lib\encodings\__init__.p
y", line 30, in ?
     import codecs, exceptions, types, aliases
   File "C:\development\projects\python\dist\src\lib\codecs.py", line 76,
  in ?
     class Codec:
   File "C:\development\projects\python\dist\src\lib\codecs.py", line 76,
  in Codec
     class Codec:
SystemError: no locals found when storing '__module__'

Or, in debug:
C:\DEVELO~1\projects\python\dist\src\PCbuild>python_d ..\PC\testpy.py
'import site' failed; use -v for traceback
Traceback (most recent call last):
   File "..\PC\testpy.py", line 31, in ?
     import regrtest # Standard Python tester.
   File "C:\DEVELO~1\projects\python\dist\src\lib\test\regrtest.py", line
  126, in ?
     from test import test_support
   File "C:\DEVELO~1\projects\python\dist\src\lib\test\test_support.py",
line 154, in ?
     TESTFN_UNICODE_UNENCODEABLE.encode("Latin1")
   File "C:\development\projects\python\dist\src\lib\encodings\__init__.p
y", line 30, in ?
     import codecs, exceptions, types, aliases
   File "C:\development\projects\python\dist\src\lib\codecs.py", line 76,
  in ?
     class Codec:
   File "C:\development\projects\python\dist\src\lib\codecs.py", line 76,
  in Codec
     class Codec:
SystemError: no locals found when storing '__module__'
[8229 refs]

Still, even building is progress, right?

Cheers,
Nick.

-- 
Nick Coghlan               |  Eugene, Oregon
Email: ncoghlan at email.com  |             USA




More information about the Python-Dev mailing list