<
stone...@gmail.com> wrote:
> I found the lines in anaconda 3 that contains DMS_WIN64
>
> This lines are not in my Lib\disutils provided by
python.org , but are in
> my numpy\distutils (provided by Christoph Gohlke, or directly by numpy
> people).
Add -DMS_WIN64 to your Lib/distutils/cygwincompiler.py. You see where to
put it (lines 140-142).
I also have -O2 or -O3 on these lines, if I remember correctly (I'm
currently on ipad).
Sturla
>>>> <a
>>>> href="
https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows">
https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows</a>
>>>>
>>>> Is it still a lost cause to get cython working on windows 64 with a gcc
>>>> or llvm compiler ?
>>>>
>>>
>>> I think the current status is that it works, but it isn't officially
>>> supported. I'd be willing to update the wiki page if the developers are
>>> interested in adding support for it. The Anaconda Distribution ships a 64
>>> bit version of MinGW that works for compiling Cython extensions, so I'd
>>> assume that using gcc for this is fairly widespread. The MinGW-builds
>>> project has good binaries available. I've had success using MinGW 4.7 (from
>>> Anaconda), 4.8 (MinGW-builds), and 4.9 (MinGW-builds). Earlier versions
>>> probably won't work since there was an ABI update in version 4.7. I could
>>> be wrong, but my understanding is that the ABI update was what allowed this
>>> sort of thing to work at all.
>>>
>>> To configure Python to use distutils, you'll want to make the
>>> distutils.cfg file in <python_path>/Lib/distutils that contains
>>>
>>> [build]
>>> compiler=mingw32
>>>
>>> [build_ext]
>>> compiler = mingw32
>>>
>>> You'll also want to be sure that gcc is on your path and that you have
>>> installed the proper dlls for compiling C extensions for 64 bit windows.
>>> You can get them here.
>>> <<a
>>> href="
http://www.lfd.uci.edu/~gohlke/pythonlibs/#libpython">
http://www.lfd.uci.edu/~gohlke/pythonlibs/#libpython</a>>
>>>
>>> I can't speak for clang/llvm. I've fiddled with it a little but haven't
>>> had any success in getting the standard library headers from mingw64
>>> included at compilation time for clang. I'm not aware of any good 64 bit
>>> binaries for it either. If you wanted to use it for compiling Python
>>> extensions on windows, you'd probably want to start by looking at the
>>> Python patch <<a
>>> href="
http://bugs.python.org/issue18834">
http://bugs.python.org/issue18834</a>> that adds
>>> support for
>>> clang to distutils. If you're really lucky, you may be able to get a 64 bit
>>> version of clang compiled and configured to use the standard library from
>>> MinGW and then be able to compile extensions using the patch shown in the
>>> Python issue. If you decide to try this, be aware that the patch is for
>>> Python 3.4. I can't say whether or not that works. I've only used
>>> gcc/g++/gfortran for this sort of thing. In theory, it should be possible,
>>> but it would still probably be an awful pain.
>>> I hope this helps.
>>> -Ian Henriksen
>>>
>>
>
> ------=_Part_1716_1227904894.1411915294970
> Content-Type: text/html; charset=UTF-8
> Content-Transfer-Encoding: quoted-printable
>
> <div dir=3D"ltr">ok, <br><br>I found the lines in anaconda 3 that contains =
> DMS_WIN64 <br><br>This lines are not in my Lib\disutils provided by python.=
> org , but are in&nbsp; my&nbsp; numpy\distutils (provided by Christoph Gohl=
> ke, or directly by numpy people).<br><br><br><br>C:\Users\famille\Anaconda3=
> -64\Lib\distutils\cygwinccompiler.py (3 hits)<br>&nbsp;&nbsp;&nbsp; Line 14=
> 0:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> self.set_executables(com=
> piler=3D'gcc -DMS_WIN64 -Wall',<br>&nbsp;&nbsp;&nbsp; Line
> 141:&nbsp;&nbsp;=
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
> sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
> &nbsp;&nbsp; compiler_so=3D'gcc -DMS_WIN64 -mdll -O
> -Wall',<br>&nbsp;&nbsp;=
> &nbsp; Line
> 142:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
> ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
> bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> compiler_cxx=3D'g++ -DMS_WIN64 -O =
> -Wall',<br>&nbsp; C:\Users\famille\Anaconda3-64\Lib\site-packages\numpy\dis=
> tutils\mingw32ccompiler.py (4 hits)<br>&nbsp;&nbsp;&nbsp; Line
> 120:&nbsp;&n=
> bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
> ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> compiler=3D'gcc -g -DDEBUG -DMS_WIN64=
> -mno-cygwin -O0 -Wall',<br>&nbsp;&nbsp;&nbsp; Line
> 121:&nbsp;&nbsp;&nbsp;&=
> nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
> p;&nbsp;&nbsp;&nbsp;&nbsp; compiler_so=3D'gcc -g -DDEBUG
> -DMS_WIN64 -mno-cy=
> gwin -O0 -Wall -Wstrict-prototypes',<br>&nbsp;&nbsp;&nbsp; Line
> 127:&nbsp;&=
> nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
> p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> compiler=3D'gcc -g -DDEBUG -DMS_WIN6=
> 4 -O0 -Wall',<br>&nbsp;&nbsp;&nbsp; Line
> 128:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
> sp;&nbsp;&nbsp; compiler_so=3D'gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict=
> -prototypes',<br><br><br>On Sunday, September 28, 2014 4:25:39 PM UTC+2, st=
>
one...@gmail.com wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0=
> ;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div di=
> r=3D"ltr">Hi Ian, <br><br>I tried the other day to do copy/paste from Anaco=
> nda64, but I obviously missed something.<br>Do you think it's a&nbsp; patch=
> &nbsp; distutils from "Enthought" or "Anaconda" ?<br><br>I would consider a=
> ll this to be "bugs".<br>Linus Torvalds&nbsp; said one time that the code t=
> hat is shipped is the code that should be supported (was speaking of andr**=
> d).<br><br>=3D=3D&gt; It sounds the same situation here.<br>=3D=3D&gt; Coul=
> dn't we get the "official" distutils to be fixed as it is fixed by the "mai=
> n" distributions ? (possibly asap for python3.4.2) ?<br><br><br><br>On Sund=
> ay, September 28, 2014 12:49:59 AM UTC+2, Ian Henriksen wrote:<blockquote c=
> lass=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #c=
> cc solid;padding-left:1ex"><div dir=3D"ltr"><br>On Saturday, September 27, =
> 2014 12:05:53 AM UTC-6, <a>
stone...@gmail.com</a> wrote:<blockquote class=
> =3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
> olid;padding-left:1ex"><div dir=3D"ltr">Hi,<br><br>I don't see any change o=
> n <a href=3D"
https://github.com/cython/cython/wiki/64BitCythonExtensionsOnW=
> indows" target=3D"_blank" onmousedown=3D"this.href=3D'
https://www.google.co=
> m/url?q\75https%3A%2F%2Fgithub.com%2Fcython%2Fcython%2Fwiki%2F64BitCythonEx=
> tensionsOnWindows\46sa\75D\46sntz\0751\46usg\75AFQjCNF8q2LqhQ56FHs_t9dmZ-ou=
> eAZpmg';return true;" onclick=3D"this.href=3D'
https://www.google.com/url?q\=
> 75https%3A%2F%2Fgithub.com%2Fcython%2Fcython%2Fwiki%2F64BitCythonExtensions=
> OnWindows\46sa\75D\46sntz\0751\46usg\75AFQjCNF8q2LqhQ56FHs_t9dmZ-oueAZpmg';=
> return true;">
https://github.com/cython/<wbr>cython/wiki/<wbr>64BitCythonEx=
> tensionsOnWindows</a><br><br>Is it still a lost cause to get cython working=
> on windows 64 with a gcc or llvm compiler ?<br></div></blockquote><div><br=
>> </div><div>I think the current status is that it works, but it isn't offic=
> ially supported. I'd be willing to update the wiki page if the developers a=
> re interested in adding support for it. The Anaconda Distribution ships a 6=
> 4 bit version of MinGW that works for compiling Cython extensions, so I'd a=
> ssume that using gcc for this is fairly widespread. The MinGW-builds projec=
> t has good binaries available. I've had success using MinGW 4.7 (from Anaco=
> nda), 4.8 (MinGW-builds), and 4.9 (MinGW-builds). Earlier versions probably=
> won't work since there was an ABI update in version 4.7. I could be wrong,=
> but my understanding is that the ABI update was what allowed this sort of =
> thing to work at all.</div><div><br></div><div>To configure Python to use d=
> istutils, you'll want to make the distutils.cfg file in &lt;python_path&gt;=
> /Lib/distutils that contains</div><div><br></div><div><div>[build]</div><di=
>> compiler=3Dmingw32</div><div><br></div><div>[build_ext]</div><div>compile=
> r =3D mingw32&nbsp;</div></div><div><br></div><div>You'll also want to be s=
> ure that gcc is on your path and that you have installed the proper dlls fo=
> r compiling C extensions for 64 bit windows. You can get them&nbsp;<a href=
> =3D"
http://www.lfd.uci.edu/~gohlke/pythonlibs/#libpython" target=3D"_blank"=
> onmousedown=3D"this.href=3D'
http://www.google.com/url?q\75http%3A%2F%2Fwww=
> .
lfd.uci.edu%2F~gohlke%2Fpythonlibs%2F%23libpython\46sa\75D\46sntz\0751\46u=
> sg\75AFQjCNF_FGJUuoWg1JsJpCLzMTgRApVJDw';return true;" onclick=3D"this.href=
> =3D'
http://www.google.com/url?q\75http%3A%2F%2Fwww.lfd.uci.edu%2F~gohlke%2F=
> pythonlibs%2F%23libpython\46sa\75D\46sntz\0751\46usg\75AFQjCNF_FGJUuoWg1JsJ=
> pCLzMTgRApVJDw';return true;">here.</a></div><div><br></div><div>I can't sp=
> eak for clang/llvm. I've fiddled with it a little but haven't had any succe=
> ss in getting the standard library headers from mingw64 included at compila=
> tion time for clang. I'm not aware of any good 64 bit binaries for it eithe=
> r. If you wanted to use it for compiling Python extensions on windows, you'=
> d probably want to start by looking at&nbsp;<a href=3D"
http://bugs.python.o=
> rg/issue18834" target=3D"_blank" onmousedown=3D"this.href=3D'
http://www.goo=
>
gle.com/url?q\75http%3A%2F%2Fbugs.python.org%2Fissue18834\46sa\75D\46sntz\0=
> 751\46usg\75AFQjCNE1oV8lppjul_GNG2jjj06NQFd88g';return true;" onclick=3D"th=
> is.href=3D'
http://www.google.com/url?q\75http%3A%2F%2Fbugs.python.org%2Fiss=
> ue18834\46sa\75D\46sntz\0751\46usg\75AFQjCNE1oV8lppjul_GNG2jjj06NQFd88g';re=
> turn true;">the Python patch</a>&nbsp;that adds support for clang to distut=
> ils. If you're really lucky, you may be able to get a 64 bit version of cla=
> ng compiled and configured to use the standard library from MinGW and then =
> be able to compile extensions using the patch shown in the Python issue. If=
> you decide to try this, be aware that the patch is for Python 3.4. I can't=
> say whether or not that works. I've only used gcc/g++/gfortran for this so=
> rt of thing. In theory, it should be possible, but it would still probably =
> be an awful pain.</div><div>I hope this helps.</div><div>-Ian Henriksen</di=
>> </div></blockquote></div></blockquote></div>
>
> <p></p>
>
> -- <br />
> <br />
> --- <br />
> You received this message because you are subscribed to the Google Groups &=
> quot;cython-users&quot; group.<br />
> To unsubscribe from this group and stop receiving emails from it, send an e=
> mail to <a href=3D"mailto:
cython-users...@googlegroups.com">cython=
> -
users+un...@googlegroups.com</a>.<br />
> For more options, visit <a href=3D"
https://groups.google.com/d/optout">http=
> ------=_Part_1716_1227904894.1411915294970--