Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Compilation on Visual Studio/MSVC 9 #44
context: I’ve built friendly CFFI-base Python wrappers that work over all Python version and implementations (PyPy…). I also vendor Argon2 and want to offer binary packages (called wheels) for Windows.
This may become a story of multiple tickets I’m afraid since I’m not too skilled WRT Windows. Anyhow but the first problem I’ve run into is that Argon2 currently can’t be compiled using MSVC 9.0 (which I believe is VS 2008) which unfortunately is the one you have to use for Python 2.7 extensions (Microsoft even put it online just for that reason: Microsoft Visual C++ Compiler for Python 2.7
The first problem I ran into is that you’re including
As such, I was able to compile most of the project:
And I really don’t know how to fix that one…
To be clear: this means it’s currently impossible to build Python 2 (still 90+% of the landscape) packages on Windows.
Steps to reproduce (tested on Windows 10):
Behold the fail.
I’m sorry. :(
I really hope we can get this working on all platforms as I’d like to establish Argon2 in the Python community. But that impossible if it doesn’t work on 2.7/Windows…
And tomorrow I’ll try to get it working on Python 3. :-/
Thanks for the very good bug report. Luckily, this seems straightforward to fix, though it's annoying that Python is still sticking to such an old Visual Studio compiler.
While a solution is not committed, you can try to fix the
Would you like a new issue or are we going just to roll with it? :)
P.S. The reason for the annoying old compiler is that Python 2.7 is from 2010 and we need binary compatibility…
You may also need to make similar adjustments in
Hm I’ve added all three includes into both
(of course the line numbers are woefully off now due to my tampering.
Line 42 would be:
(the last line of the statement to be precise)
OK got to play some more. Let me start with good news: Python 3.5 works. :)
To sum up, currently the following things break for Python 2.7/Windows/VS 2008:
And the line it objects is the following:
Sorry for being completely useless here. Windows is wayyyy out of my comfort zone. :(
I think the last commit should compile fine everywhere now. Let me know if anything else comes up.
I have not yet included
Yeah I don’t think you actually can include them since they’re “New BSD” and you want to stay CC0 I presume.
Anyhow, I’ve done what you suggested and I’m happy to report great success: https://jenkins.cryptography.io/job/argon2_cffi-wheel-builder/TOXENV=py27,label=windows/12/console
Thanks for your assistance, it’s very appreciated!