Building RPMs

It's bothered me a little that I couldn't build an rpm of matplotlib, so I resolved to work it out this time. These are the issues I had: imports gtk while checking backend compatablity. This fails because the gtk module won't load if the DISPLAY variable is not set. The trouble lies in /usr/lib/rpm/redhat/macros on my system, and commenting out the unset DISPLAY lines does the trick. That whole section of the file is identified as slightly superfluous by the comments, if I'm reading them right. I'm not very handy with rpm macros.

A known distutils issue causes the procedure to complain all the way at the end, about there being the wrong number of files in the rpm. There are three ways to fix it that I found:

1) Ignore it. The rpm is built, but not copied into the dist directory. Get it from build/bdist.linux-i686/rpm/RPMS, or as appropriate for your platform.

2) Apply a distutils patch: I haven't actually tried it.

3) Add this line to your ~/.rpmmacros: %debug_package %{nil}. You will get a much larger rpm. It looks like the binaries have debugging information included.

Chris Fuller