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

Jeff Hardy jdhardy at gmail.com
Tue May 8 17:47:39 CEST 2012


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


More information about the Ironpython-users mailing list