On 10 September 2000, Paul F. Dubois said:
Just a thought related to what you are doing here; I have had some experiences where the LOCATION mattered too. For example, a certain library was in /usr/local on one of our systems, and in someone's home directory on another, even though otherwise the systems were identical. Of course, I don't know how you could "detect" the location except as a possible configuration variable. Indeed, I did just that in one make system I wrote.
Umm, I'm not talking about auto-configuration -- I'm talking about generating a reasonable "platform ID" string on a variety of Unices. Requirements: * should establish enough binary compatibility for most situations (ie. the OS name, usually the OS release, and quite often the hardware architecture) * for a given OS, should be codable in a few lines of Python based entirely on information available from Python's os and sys modules (eg. os.uname())
In short, I'm looking for something more informative than sys.platform ("linux2" doesn't cut it), but less expensive than what MAL's platform.py computes.
Regarding finding required libraries for auto-configuration (since you brought it up), I mostly agree with Bastian. I would add to that: take a stab at searching the prefix directory; if someone installs everything to prefix=/opt/funky/path, then you might just find that key library in /opt/funky/path/lib.