Connecting Tech Pros Worldwide Forums | Help | Site Map

Python on win64

Mauro Cicognini
Guest
 
Posts: n/a
#1: Jul 18 '05
Hi to everybody,
please forgive me if what I'm asking is obvious but I couldn't really
find out any good pointers in a few hours of googling on the python site
and related places.

The question is: Does anyone have any advice on how to build Python on
win64 boxes?

We know it _is_ possible after we found Martin von Loewis's cool
installer. The only catch is, we don't know how he got there :-(

I'm asking 'cause we recently got an Itanium machine with Windows Server
2003 on it and started looking on how to port some of our stuff to it.
However, since there's no MS IDE for win64, the only way to build Python
would be to use the SDK, but that needs makefiles and those would need
to be exported from the MSVC project files, with no guarantee of success.

Besides, we'd need to have some other windows things there, and we have
few clues on how to proceed, so if anyone has any pointers we'd be very
thankful.

Thanks a lot in advance,

Mauro Cicognini
Siosistemi S.p.A., Italy


Trent Mick
Guest
 
Posts: n/a
#2: Jul 18 '05

re: Python on win64


[Mauro Cicognini wrote][color=blue]
> I'm asking 'cause we recently got an Itanium machine with Windows Server
> 2003 on it and started looking on how to port some of our stuff to it.
> However, since there's no MS IDE for win64, the only way to build Python
> would be to use the SDK, but that needs makefiles and those would need
> to be exported from the MSVC project files, with no guarantee of success.[/color]

That is what I do: use the SDK to cross-build for Win64 on Win32 using
exported makefile from the MSVC .dsp files. For Python 2.2 at least I
found that everything but the _tkinter and winsound extensions worked
find.


Trent

--
Trent Mick
TrentM@ActiveState.com

Martin v. Löwis
Guest
 
Posts: n/a
#3: Jul 18 '05

re: Python on win64


Mauro Cicognini wrote:
[color=blue]
> The question is: Does anyone have any advice on how to build Python on
> win64 boxes?
>
> We know it _is_ possible after we found Martin von Loewis's cool
> installer. The only catch is, we don't know how he got there :-([/color]

Like Trent says: Export the makefiles in VC6. Then, you have to massage
them manually, i.e. replacing all /machine:x86 by /machine:ia64 or some
such. You also have to remove libraries that aren't there in the Win64
SDK.
[color=blue]
> I'm asking 'cause we recently got an Itanium machine with Windows Server
> 2003 on it and started looking on how to port some of our stuff to it.
> However, since there's no MS IDE for win64, the only way to build Python
> would be to use the SDK, but that needs makefiles and those would need
> to be exported from the MSVC project files, with no guarantee of success.[/color]

Strictly speaking, this is not true: you don't actually *need* the
makefiles. You could instead perform all necessary compiler invocations
manually.

Also, I advise against building on Win64: The SDK compiler is an x86
application, and those are awfully slow when executed on Itanium. So
it is faster to build on x86, and carry over the binaries.

An alternative might be to use the Intel compiler, which is a native
Itanium binary.
[color=blue]
> Besides, we'd need to have some other windows things there, and we have
> few clues on how to proceed, so if anyone has any pointers we'd be very
> thankful.[/color]

You might want to take a look at Peter Tröger's "Visual Studio External
Compiler" project, at sf.net/projects/vsextcomp. It allows to derive
Win64 targets from VC7.1 Win32 projects, using the SDK compiler. Using
that technology, the procedure is:

1. convert the VC6 project files to VC7
2. for each project, for both the debug and the release target,
create a parallel debug64 and release64 target, using the new item
in the Tools menu.

With that approach, you can run the entire build process inside VC7.1.
The intention is to extend this beyond Win64-Itanium-SDK-compiler;
feedback and patches are welcome (e.g. it should be possible to put
triple-projects, including AMD64, into place, once the SDK supports
AMD64).

I'm using this to eliminate all the size_t warnings in Python, which
I hope to contribute for 2.4 once completed.

As for generating an MSI file at the end: please don't ask me -
atleast not unless you know what orca.exe is :-)

Regards,
Martin

Closed Thread