[IronPython] How to include packages in compilation

Heiko Henkelmann heiko at hhenkelmann.de
Sun Feb 21 19:38:29 CET 2010

Hi Matt,

thank you for the hint. It work as described. Creating a seperate 
assembly did the job.


Am 21.02.2010 15:48, schrieb Matt Ward:
> Hi Heiko,
> Can you use _ctypes provided by IronPython in IronPython.Modules? You
> may have to use a later version of SharpDevelop to get IronPython 2.6
> with the _ctypes module.
> If not then you could compile ctypes into a separate assembly. Harry
> Pierson has a post on this:
> http://devhawk.net/2009/08/10/Compiling+Python+Packages+Into+Assemblies.aspx
> You should be able to do the same thing with SharpDevelop if you
> create a new class library project called ctypes, add the ctypes .py
> files to it, compile it and then reference the ctypes assembly in your
> main project. You will need to add quite a few other python files to
> your main project though (os.py, ntpath,py, stat.py, abc.py,
> _abcoll.py, genericpath.py, linecache.py, struct.py, types.py,
> UserDict.py, warnings.py) to be able to compile your application.
> Regards,
> Matt
> On 21 February 2010 13:24, Heiko Henkelmann<heiko at hhenkelmann.de>  wrote:
>> Dear All,
>> I need to use the Queue and ctypes modules from the standard library in my
>> project and I want to compile the project to distribute it. I'm using
>> SharpDevelop 3.1 to do the compilation. For the Queue module I succeded by
>> manually including all the needed py files from the Lib subdir of my
>> IronPython 2.6 directory in the project. Due to the fact that ctypes is a
>> package I was up to now unable to find a solution. I assume the problem
>> would be the same if I would use pyc.py.
>> Does anyone have an idea how to include packages in the compilation?
>> Thank you in advance.
>> Heiko
>> _______________________________________________
>> Users mailing list
>> Users at lists.ironpython.com
>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

More information about the Ironpython-users mailing list