[Ironpython-users] Fwd: cython-for-ironpython

Pawel Jasinski pawel.jasinski at gmail.com
Tue Jun 3 14:15:34 CEST 2014


---------- Forwarded message ----------
From: Pawel Jasinski <pawel.jasinski at gmail.com>
Date: Tue, Jun 3, 2014 at 2:15 PM
Subject: Re: [Ironpython-users] cython-for-ironpython
To: Markus Schaber <m.schaber at codesys.com>


sorry I should mention it more explicit, I am trying to resurrect
cython-for-ironpython
https://bitbucket.org/jasonmccampbell/cython-for-ironpython
The hint is well hidden as '--dotnet' parameter to cython :-)
The code generated is intended for c++/clr

Somehow, based on the posts here:
http://blog.enthought.com/python/scipy-for-net/#.U42jOygfzm_  (interesting
bits at the bottom), I have assumed that I can use cython-for-ironpython to
create c++/clr module and use it directly from ironpython.
I also assumed, that as long as I don't link with cpython extension and
stay within what comes out of cython, there are no external dependencies.
The post does not mention ironclad, but I will check. Perhaps it is a
silent dependency.

I also looked at the generated code and I can see a reference to CallSite
which is marked in ironpython assembly as internal. So, either things
changed a bit since 2011 or they had a custom build of IronPython.



--pawel



On Tue, Jun 3, 2014 at 1:47 PM, Markus Schaber <m.schaber at codesys.com>
wrote:

>  Hi, Pawel,
>
>
>
> IronPython has completely different inner workings than cPython. It uses
> .NET and the DLR infrastructure (memory management, objects, etc..) instead
> of the C-implemented Infrastructure provided by cPython.
>
>
>
> Two projects tried to bridge the gap between cPython and IronPython / .NET
>
>
>
> https://code.google.com/p/ironclad/: Import cPython extensions in
> IronPython, this is what could match your "mapping dll" requirement.)
>
>
>
> http://pythonnet.sourceforge.net/: Allows cPython code to call into .NET
> code.
>
>
>
> Both projects look rather dormant nowadays.
>
>
>
> So it is not easily possible to use output compiled by cython within
> IronPython.
>
>
>
> The same applies to Jython and some other alternative implementations.
>
>
>
> On the other hand, IronPython and the DLR provide powerful Just-in-Time
> capabilities, so you may get the desired speed without actually using
> Cython.
>
>
>
>
>
> Best regards
>
> Markus Schaber
>
> *CODESYS®* a trademark of 3S-Smart Software Solutions GmbH
>
> *Inspiring Automation Solutions *
>  ------------------------------
>
> 3S-Smart Software Solutions GmbH
> Dipl.-Inf. Markus Schaber | Product Development Core Technology
> Memminger Str. 151 | 87439 Kempten | Germany
> Tel. +49-831-54031-979 | Fax +49-831-54031-50
>
> E-Mail: m.schaber at codesys.com | Web: codesys.com <http://www.codesys.com>
> | CODESYS store: store.codesys.com
> CODESYS forum: forum.codesys.com
>
> *Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner* | *Trade
> register: Kempten HRB 6186* | *Tax ID No.: DE 167014915*
>
> *Von:* Ironpython-users [mailto:ironpython-users-bounces+m.schaber=
> codesys.com at python.org] *Im Auftrag von *Pawel Jasinski
> *Gesendet:* Dienstag, 3. Juni 2014 12:30
> *An:* ironpython-users at python.org
> *Betreff:* [Ironpython-users] cython-for-ironpython
>
>
>
> Hi,
>
> I am trying to get hello world with cython. I took a simple cnumop.cpp
> from tests and run:
>
> ipy cython.py --dotnet tests/compile/cnumop.pyx
>
> The resulting file (cnumop.cpp) is now part of project (cpp/clr/class
> library).
>
> After resolving usual reference dependencies I hit: PyErr_Format
>
> Since this is a symbol which is coming out of cpython, I am looking for
> equivalent in clr world.
>
> I looked in cython itself but found nothing (mapping?)
>
> Is there some sort of mapping dll (cpython symbols => iron symbols)?
>
> Or perhaps I am doing something wrong when invoking cython?
>
>
>
> Any help or information about this is greatly appreciated.
>
> --pawel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20140603/92019769/attachment.html>


More information about the Ironpython-users mailing list