Installation to Win32 is fiddly

Bug #268151 reported by cratuki
4
Affects Status Importance Assigned to Milestone
Storm
Fix Released
High
James Henstridge

Bug Description

I'm running on Windows XP.

1) There's no egg release of 0.13 on the website
-> So I downloaded the source

2) Trying to install this didn't work.

C:\temp\storm-0.13>python setup.py install
running install
running bdist_egg
running egg_info
writing storm.egg-info\PKG-INFO
writing top-level names to storm.egg-info\top_level.txt
writing dependency_links to storm.egg-info\dependency_links.txt
reading manifest file 'storm.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'storm.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.

C:\temp\storm-0.13>

On irc, someone recommended that I change BUILD_CEXTENSIONS in setup.py to False, and this allowed me to install.

3) I actually do have Visual Studio 2008 installed, so the person working on this bug might also want to make the sweep for build tools search more widely if Visual Studio compilers are backwards compatible in a manner that would completement this.

(from cratuki on #freenode irc)

Related branches

Revision history for this message
James Henstridge (jamesh) wrote :

Visual Studio 2008 uses a different C runtime to 2003, so produces extensions that can't be used with a Python interpreter compiled with the older version. This is why the check is in place.

Revision history for this message
James Henstridge (jamesh) wrote :

Since the C extension is optional, we should probably swipe the optional_build_ext stuff from:

  http://svn.zope.org/zope.interface/trunk/setup.py?view=auto

That'd allow setup.py to work on systems that lack a compiler (or the correct compiler in the win32 case).

Revision history for this message
Michał Pasternak (dotz) wrote :

There is a very good summary on building Python stuff on win32 with free tools (mingw or cygwin): http://boodebr.org/main/python/build-windows-extensions

Unfortunatley, the C extension will not compile on MinGW32 or Cygwin without changes. Please see the attached patch. I am not sure if this is MinGW32/Cygwin bug. I am also not aware of any other walk-arounds. Perhaps someone else could make the patch worth merging with some changes.

Revision history for this message
Michał Pasternak (dotz) wrote :

I confirm this bug. It is not possible to build Storm's cextensions.c on win32+Python2.5+cygwin/mingw32 without changing Storm's source code.

Changed in storm:
status: New → Confirmed
Revision history for this message
James Henstridge (jamesh) wrote :

We should definitely make a change similar to this. This is a fairly common problem on win32, since it doesn't support using symbols exported from DLLs in static initialisers.

We should also adjust the setup.py script to function when no compiler is available at all though, since Storm is still usable without the extension.

Jamu Kakar (jkakar)
Changed in storm:
assignee: nobody → James Henstridge (jamesh)
importance: Undecided → High
milestone: none → 0.15
status: Confirmed → In Progress
Revision history for this message
James Henstridge (jamesh) wrote :

The fix for the win32 compile errors was merged in r323.

I've opened bug 410524 to track the "no compiler => don't compile extension" improvement.

Changed in storm:
status: In Progress → Fix Committed
Jamu Kakar (jkakar)
Changed in storm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.