[New-bugs-announce] [issue8597] build out-of-line asm on Windows

Zooko O'Whielacronx report at bugs.python.org
Sun May 2 07:45:31 CEST 2010


New submission from Zooko O'Whielacronx <zooko at zooko.com>:

I maintain a Python package which comes with assembly optimizations -- http://tahoe-lafs.org/trac/pycryptopp . Someone was porting this package to Win64 today and discovered that distutils couldn't build it because the Microsoft compiler on Win64 doesn't allow in-line assembly and distutils doesn't know how to build out-of-line assembly (see also http://stackoverflow.com/questions/1664812/can-pythons-distutils-compile-s-assembly which says that there isn't a known way to do this).

So the fellow who is porting pycryptopp to Win64 for me, Samuel Neves, found this hack in someone else's setup.py file: http://bitbucket.org/ambroff/greenlet/src/3ad4830aa109/setup.py

We're probably going to adapt that hack to the pycryptopp setup.py file in order to work around this problem.

But then another fellow named Josip Djolonga who is a GSoC student working on Distutils2 suggested that we could patch the compiler class to use assembly files and pass them to cl.exe. Samuel worked up a patch that does that and then he was able to build pycryptopp on Win64. Here is his patch attached as a file.

Note that we will still need to do some work-around in the pycryptopp setup.py file in order to make pycryptopp buildable on Win64 with older versions of Python that do not have this fix. Any suggestions on the best way to do that would be welcome.

Oops, I see that Samuel gave me the patch in traditional diff form instead of unified diff form. I hope you can accept it anyway since he has gone to bed.

----------
assignee: tarek
components: Distutils
files: patch.diff
keywords: patch
messages: 104770
nosy: tarek, zooko
priority: normal
severity: normal
status: open
title: build out-of-line asm on Windows
type: behavior
Added file: http://bugs.python.org/file17182/patch.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8597>
_______________________________________


More information about the New-bugs-announce mailing list