[Ironpython-users] Guidelines for embedding Python libraries in installers

Igor Brejc igor.brejc at gmail.com
Tue May 8 20:45:23 CEST 2012


Hi,

Maperitive uses IronPython for embedded scripting. What I did for
Maperitive (I'm not using MSI installations, I just have a ZIP package) is
to simply include the IronPython DLLs and some of the libraries from
CPython (copy pasted into the package). It works on Windows, Linux and Mac.

Igor

On Tue, May 8, 2012 at 7:25 PM, Cesar Mello <cmello at gmail.com> wrote:

> Thank you very much for the explanation Jeff!
>
> For my current prototype I have added the IronPython's MSI to the
> bootstrapper; and the NumPy's \DLLs and \Lib folders to my products's dir;
> and then I setup the host library path with both IronPython's folders and
> the app's \DLLs and \Lib. It seems to be working nicely.
>
> Just as a curiosity, a small weird thing I saw with NumPy was this issue:
> http://stackoverflow.com/questions/5526151/ironpython-invocation-from-c-sharp-with-scipy-fails-with-importexception-no .
> But I added the reference and it works now.
>
> Thanks a lot!
>
> Best regards!
> Mello
>
>
>
>
>
> On Tue, May 8, 2012 at 12:47 PM, Jeff Hardy <jdhardy at gmail.com> wrote:
>
>> On Tue, May 8, 2012 at 6:11 AM, Cesar Mello <cmello at gmail.com> wrote:
>> > Hi!
>> >
>> > Please I would like to know if there is any recommendation for embedding
>> > Python libraries together with IronPython in applications. I'm asking
>> this
>> > just to know if there is a path to follow towards some "ecosystem"
>> regarding
>> > Python libraries distribution.
>>
>> The standard home for Python packages is PyPI (aka "the Cheeseshop") -
>> http://pypi.python.org. Python packaging in general is handled the
>> standard distutils library, and the setuptools/distribute extensions
>> (most of which are folded into distutils2, now known as 'packaging' in
>> Python 3.3). Installation is done with easy_install (part of
>> setuptools/distribute) or pip.
>>
>> One thing I'll give the Ruby guys - they got the gem ecosystem in
>> place early and stuck with it.
>>
>> Now, IronPython doesn't support a lot of this right now. distribute
>> and pip mostly work (there are a couple of tiny patches needed to them
>> that I need to work on), but most of the pypi packages are bz2, which
>> was a problem until I added bz2 a couple of days ago. Getting
>> distribute and pip (and maybe virtualenv) working is one of my goals
>> for 2.7.3.
>>
>> >
>> > I have seen there is an installer for NumPy based on ironpkg here:
>> > http://www.enthought.com/repo/.iron/
>> >
>> > Should that be a recommended approach to follow?
>>
>> That was a one-off created by Enthought for distributing NumPy. I
>> don't think there's much reason to use it.
>>
>> Since I know you want to include the libraries, the easiest way (for
>> now) would be to use a clean CPython installation and use easy_install
>> to add the necessary packages (they are stored in Lib/site-packages).
>> Then copy the site-packages directory into the IronPython stdlib so
>> that it can all be deployed together.
>>
>> - Jeff
>>
>
>
> _______________________________________________
> Ironpython-users mailing list
> Ironpython-users at python.org
> http://mail.python.org/mailman/listinfo/ironpython-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20120508/dbe7e127/attachment.html>


More information about the Ironpython-users mailing list