patch - further makefile changes based on OSX building
I just checked out trunk and ran through the process of making it work for OSX in pursuit of a more perfect build system. Thought I'd share the results (and diff).
To accomplish this, I had to set up the PKG_CONFIG_PATH manually to point to the version of python I wanted to use, and to the mono I wanted to use. And as you can see in the diff, I had to pull some bad code out that wasn't using pkg-config, where it really should be. I suspect the contentious part will be where I remove an evaluation of python code into distutils, and instead use pkg-config to get the flags.
I think both of these changes really strongly point to a need for a "configure" script.
Getting build flags from the currently resolving shell command "python" doesn't really take into account the reality that python is often compiled directly into 3rd party applications… such as say, Maya or Nuke, from the visual effects world of applications. These are valid alternative cpython runtimes that are installed and will be able to take the clr module if the build system allows you to configure to target them rather than the one that happens to run when you type "python" at a shell.
As far as the mono version goes… I actually have three. A binary package installed form the mono project's download page. An alternative build out of mac-ports. And… the one I actually built against, a build of the latest released tar ball, turning on their experimental 64bit support. There are issues with the others as they are 32bit only… and in lion land.. well we've gone 64bit and its a mess. But I figure: that it builds against a proper 64bit version, when you provide it, is a good thing.
Anyhow, with the changes in the diff and the extra step of configuring the PKG_CONFIG_PATH environment variable by hand, it builds and I can import clr in the system installed python2.7. And I can run some methods off the System.IO.Path class. So well… TADA!
Attached is a diff of what I did. Dunno if you want to consider applying it. I have not tested it on ubuntu, redhat or windows. But I'm curious as to thoughts on what I did.