Archive for January, 2008

River City Bluegrass Festival

Sunday, January 6th, 2008

I wandered over to the convention center on Friday for opening night of the River City Bluegrass Festival. There was a great lineup including Tim O’Brien and the David Grisman Quintet. I was by myself, which was a blessing in disguise. I met all kinds of great people and even managed to squeeze into a single seat up front at the main stage.

A lot of people had instruments with them and were jamming all over the place: hallways, stairwells, out in the rain. 80 year old great-grandfathers, 8 year old phenoms, they were all there. That’s something that bluegrass brings, community, family. Really inspired me to get my shit together and start playing regularly with folks. Next year river city bluegrass, I’ll be back.

It’s amazing how you form an idea of a person through listening to their recordings, a romanticized notion maybe. Tim O’Brien was not who I expected and he was everything I expected. He’s an everyday guy, who just happens to know how to play guitar, mandolin and fiddle very well. Gives me some hope for myself and my playing.

David “Dawg” Grisman came out with his group The David Grisman Quintet (DGQ) and just blew everyone away with their jazz, bluegrass, funk fusion. It was my first experience listening to Grisman (besides the old grisman, garcia, rice recordings) and all of them were just phenomenal as individual musicians, most were clearly trained in Jazz and able to pull off intricate and complex solos with ease. Matt Eakle on the flute brought this warmth to the whole sound. Overall, man it was just great to listen to this group at a bluegrass festival, really mixing things up. I can relate in some ways, I mean don’t get me wrong I like old timey bluegrass but in this day there are so many musical inspirations that if I continue playing I won’t be able to help but blend them. Why squeeze myself into a box and deny myself that enjoyment?

I met Dawg after the show. What can you say but thank you….

Using py2exe and Inno Setup with PyQT and Matplotlib

Tuesday, January 1st, 2008

Happy New Year! I seem to have some good momentum going into 2008. Hopefully I can keep things rolling along.

I wrapped the 0.2 release of Delphos into an installer yesterday using Inno Setup. I did this by combining my existing py2exe build script with a sample script from the py2exe code repository. This sample first runs py2exe and then generates a build script for Inno Setup on the fly and passes it to the Inno Setup compiler. Source to installer in one shot!

The biggest issue was getting matplotlib to play nice. PyQt, SqlAlchemy and the other modules had no problem. Matplotlib requires additional data files to be packaged into the py2exe build, multiple directories worth in fact with their own subdirectories and files. Matplotlib has a function that tells you exactly what supplementary data files it needs (called get_py2exe_datafiles), but it didn’t work correctly for me (see this thread). So, until now I would just copy them all into a new build by hand but now I needed Inno Setup to know about each of these files too so it could bundle them into the installer. In this case the handoff from py2exe to Inno Setup is automated so the solution was to tell py2exe about the additional data files and that information would get passed on to be included in the Inno Setup build script that’s generated.

One solution was to list every data file by hand in the py2exe portion of the build script, but geez what a tedious waste of time. This kind of stuff changes regularly so it had to be automated as much as possible. Unfortunately, telling py2exe about multiple directories worth of data files to include isn’t easy. It seems distutils, which py2exe runs on top of, can only be given a list of individual files to include with the build. You can’t (that I know of) simply give it a directory path and it will recursively include all directories and files underneath.

Thankfully I found a nice little function on the net from a guy named jt (referenced in the build script) that walks a directory structure and builds a list of file names and paths in the form that py2exe expects. I used that same function to package all of my documentation files and other boilerplate stuff with the build. Very slick. I had to make a quick fix to it though as the function was mistaking directories for files in some cases. Py2exe handled this fine but InnoSetup would error if asked to copy a directory when expecting a file. So, I essentially massacred a sweet little 2 line piece of functional programming goodness and dropped in a ‘quick’ fix. Time is short ya know…

The py2exe/Inno Setup build script can be found here.