[Insight-developers] [SimpleITK] PyPi distribution

Matt McCormick matt.mccormick at kitware.com
Thu Sep 15 12:30:23 EDT 2011


Hi Brad,

> I have made some really good progress on this.

Outstanding!

> I am looking for documentation on how easy_install determines which binary
> distribution to use. On my Mac I am getting eggs with the following name
> format: SimpleITK-0.2.0-Py2.6.egg. I don't know how it is suppose to
> determine with OS the egg is for. I have the feeling that there is suppose
> to be some platform string in the name too, but I don't know what
> easy_install is looking for or which of the many platform strings available
> in python should be used.

The egg is just a zip file.  Unpacking it, I don't see any OS
information.  If users are downloading on their own, it may be up to
them to make sure they have the right version.

However, if we get PyPi working for binaries, it might be OK.  Then,
people could hopefully do

easy_install SimpleITK

or

pip install SimpleITK

(pip is the replacement for easy_install, which has been deprecated).

> Any ideas on where I can find some more information about this?

There is a 'platforms' field in the setup.py metadata,
http://docs.python.org/distutils/setupscript.html#meta-data,

but I do not know what it does.

We can look at what information PyPi has:

wget http://pypi.python.org/pypi/SimpleITK/json

That currently gives:

{
    "info": {
        "maintainer": "",
        "requires_python": null,
        "maintainer_email": "",
        "cheesecake_code_kwalitee_id": null,
        "keywords": "ITK InsightToolkit segmentation registration image",
        "package_url": "http://pypi.python.org/pypi/SimpleITK",
        "author": "Insight Software Consortium",
        "author_email": "insight-users at itk.org",
        "download_url":
"http://erie.nlm.nih.gov/~blowek1/SimpleITK/PyDownload.html",
        "platform": "UNKNOWN",
        "version": "0.2.0",
        "cheesecake_documentation_id": null,
        "_pypi_hidden": false,
        "description": "Provide an abstraction layer to ITK that
enables developers    and users to access the powerful features of the
InsightToolkit in a more     simplified manner.",
        "release_url": "http://pypi.python.org/pypi/SimpleITK/0.2.0",
        "_pypi_ordering": 1,
        "classifiers": [
            "Development Status :: 4 - Beta",
            "Intended Audience :: Developers",
            "License :: OSI Approved :: Apache Software License",
            "Programming Language :: Python",
            "Topic :: Scientific/Engineering"
        ],
        "name": "SimpleITK",
        "bugtrack_url": "",
        "license": "Apache",
        "summary": "Simplified interface to the Insight Toolkit for
image registration and segmentation",
        "home_page": "http://simpleitk.org/",
        "stable_version": null,
        "cheesecake_installability_id": null
    },
    "urls": []
}

Maybe after we start doing some uploads, i.e. python setup.py
bdist_egg upload, it will have more information?

Matt


> Thanks,
> Brad
> On Sep 14, 2011, at 3:28 PM, Matt McCormick wrote:
>
> Hi Brad,
>
> I did a little research after the Tcon conversation on the Python
> distribution this morning:
>
> A quick run down on Python distribution can be found here:
>
> http://packages.python.org/an_example_pypi_project/setuptools.html#putting-it-all-together-with-the-full-windows-script
>
> This shows how to make binary eggs, binary Windows stand alone
> installers, and upload eggs to PyPi.
>
> Note that source distributions will probably not work because Python
> has its own C Extension build system that is presumed to be used.
>
> As it mentions, binary eggs are distinguished by Python version and
> operating system.  On Windows, they use the Visual Studio compiler, so
> it is good to stick with that.  Python 2.6 and Python 2.7 would be
> good versions to target.  The Python 3 series would be nice if we have
> time.
>
> The PyPi website is here:
>
> http://pypi.python.org/pypi
>
> Instructions setting up a project can be found here:
>
> http://wiki.python.org/moin/CheeseShopTutorial
>
> It would be appropriate if one of the primary developers like yourself
> admin'ed the project instead of myself so credit goes where due.
>
> Let me know if I can help out.
>
> Thanks,
> Matt
>
> ========================================================
>
> Bradley Lowekamp
>
> Lockheed Martin Contractor for
>
> Office of High Performance Computing and Communications
>
> National Library of Medicine
>
> blowekamp at mail.nih.gov
>
>


More information about the Insight-developers mailing list