Mac binary installer

I have a few questions and comments about the Mac binary of matplotlib
0.98.3:
   matplotlib-0.98.3-py2.5-macosx-10.3.egg.zip
   
A few things struck me as scary:
- There are no instructions; when you unzip it you get just an egg and
that's it. I was able to find the magic incantation on the web, and
fortunately I already have easy_install installed. But it would be a big
help to have a ReadMe that tells how to install easy_install and how to
use it to install the egg.

- The zipped egg includes dateutil and pytz. But I already have those
installed (both due to using older matplotlib and because I use dateutil
in my own code), so now I have two sets in different locations. This is
worrisome. Which one will get used? Does it matter if I import dateutil
first or matplotlib first? (I deleted the versions in the matplotlib egg
to remove doubt.)

I thought easy_install could handle dependencies (and indeed, per the
next item, it seemed to be trying to do so). If so, couldn't it only
install them if not already present?

- When I ran easy_install it started searching the web and installing
stuff. But what was it downloading and installing? The messages were
very vague. I already had dateutil and pytz, so did the egg, so it would
be crazy for it to download those. But what in the world else could it
possibly need? Surely the freetype and png are already statically linked
in (or perhaps it's using Apple's freetype). Surely it doesn't want to
download those as libraries and install them? Surely it would not
install wxpython, since that is optional?

I do appreciate the effort that goes into producing these binaries. (I
used to make a matplotlib package installer for pythonmac.org and was
glad to give it up.) And the results do seem to work.

-- Russell

I have a few questions and comments about the Mac binary of matplotlib

0.98.3:

matplotlib-0.98.3-py2.5-macosx-10.3.egg.zip

A few things struck me as scary:

  • There are no instructions; when you unzip it you get just an egg and

that’s it. I was able to find the magic incantation on the web, and

fortunately I already have easy_install installed. But it would be a big

help to have a ReadMe that tells how to install easy_install and how to

use it to install the egg.

Technically you are not supposed to unzip the package by hand. At most we could put some info on the website, but you can’t really add a readme inside of the egg.

  • The zipped egg includes dateutil and pytz. But I already have those

installed (both due to using older matplotlib and because I use dateutil

in my own code), so now I have two sets in different locations. This is

worrisome. Which one will get used? Does it matter if I import dateutil

first or matplotlib first? (I deleted the versions in the matplotlib egg

to remove doubt.)

These still need to be included for those who do not have them installed. (except for what you mention next)

I thought easy_install could handle dependencies (and indeed, per the

next item, it seemed to be trying to do so). If so, couldn’t it only

install them if not already present?

True. We probably still bundle them since this is what has historically been done. We don’t list numpy as a dependency – even though it is – because they don’t supply eggs for all platforms.

  • When I ran easy_install it started searching the web and installing

stuff. But what was it downloading and installing? The messages were

very vague. I already had dateutil and pytz, so did the egg, so it would

be crazy for it to download those. But what in the world else could it

possibly need? Surely the freetype and png are already statically linked

in (or perhaps it’s using Apple’s freetype). Surely it doesn’t want to

download those as libraries and install them? Surely it would not

install wxpython, since that is optional?

This has been discussed a little on the lists. To sum up, setuptools doesn’t like universal binaries. For some reason it installs the egg fine, but then tries to install from source.

I do appreciate the effort that goes into producing these binaries. (I

used to make a matplotlib package installer for pythonmac.org and was

glad to give it up.) And the results do seem to work.

Thanks for the feedback. I promise I am not trying to be short with you, but I don’t have much time to respond before I need to run out. I keep telling myself I will find the time to contribute a patch to setuptools to support fat binaries, but we can’t do much for now.

Thanks,

  • Charlie
···

On Wed, Aug 13, 2008 at 2:25 PM, Russell E. Owen <rowen@…270…> wrote:

Charlie Moad wrote:

Technically you are not supposed to unzip the package by hand.

how are you supposed to install it? can I do:

easy_install TheNameOfTheZipfile.zip ??

or am I just supposed to do:

easy_install matplotlib

and have setuptools download it for me.

At most we could put some info on the website, but you can't really add a readme inside of the egg.

You can't put a readme in the zip file?

This does remind me a discussion we had on the python-mac list a good while back -- it would be nice if MacPython came with a utility that would let you click on and egg and have it do something intelligent (what was a subject of much debate!)

    - The zipped egg includes dateutil and pytz. But I already have those
    installed (both due to using older matplotlib and because I use dateutil
    in my own code), so now I have two sets in different locations. This is
    worrisome.

hopefully the one that came with mpl is not directly on your sys.path, so it won't get imported accidentally, but I haven't looked lately.

This has been discussed a little on the lists. To sum up, setuptools doesn't like universal binaries. For some reason it installs the egg fine, but then tries to install from source.

I've found is works OK if you re-name the egg to something like:

matplotlib-0.98.3-py2.5.egg

instead of:

matplotlib-0.98.3-py2.5-macosx-10.3.egg

don't ask me why -- setuptools is a mystery to me.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...236...

You can’t put a readme in the zip file?

I think he was referring to the egg as a zip, which it technically is but setuptools extracts it for you.