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
On Wed, Aug 13, 2008 at 2:25 PM, Russell E. Owen <rowen@u.washington.edu>wrote: > 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
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 Chr...@no...
> > > 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.
In article <638...@ma...>, "Charlie Moad" <cw...@gm...> wrote: > > > > > > 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. I already find easy_install mysterious and unsettling and I guess you can add this notational confusion to the list. Why not call .egg.zip a "zipped egg" even if easy_install can handle it directly? But avoiding the notational issue entirely, here's my take on it: The file I downloaded was a .zip file. The obvious naive thing to do with a zip file is to unzip it, especially if one is looking for instructions! This yields a .egg file. It could yield a .egg file and a ReadMe file if one was included in the zip file. easy_install can install a .egg file so it's no harm to unzip the download. Presumably one could include a ReadMe file into the .egg.zip in such a way that easy_install would ignore it. On the other hand, the web page that is the source of the download could also have the ReadMe info, as you point out. Either is fine. Personally I am not sold on easy_install. It's a clever idea and maybe someday it'll live up to its promise, but right now it seems to have some many undesirable behaviors (such as mysteriously and needlessly downloading stuff). For now I'd suggest that package installers (e.g. as created by bdist_mpkg) be used for Mac because they are standard, are used by simply double clicking (thus have no learning curve or need to install anything), have ReadMe support build in, and do not mysteriously download stuff. -- Russell