On 09 March 2000, Fred L. Drake, Jr. said:
I was just looking at sysconfig.py again, and I'm not sure I really like the interfaces to get_python_*(). In particular, the plat_specific parameter seems strange, especially since it will produce the same result in most cases. Perhaps the Right Way To Do It(TM) would be to drop the parameter and return a list containing all the dirs that apply. To locate config.h, for instance, search each location in the list.
But it's not just for finding stuff -- it's also for installing stuff. Actually, I think include files should probably always be installed to the platform-specific directory: * include files are presumably only distributed with extensions ("non-pure distribtions") * we've said again and again that all modules in a non-pure distribution go under exec-prefix * one of the arguments in favour of that is so that you don't get version/platform mismatches * that argument is just as strong for C header files * therefore, C header files should always be installed (at least on Unix) to <exec-prefix>/include/python1.X/<distname> But we still need access to both include directories, e.g. if you need to find Python.h (or if you need to add its directory to the compiler command line, which you most certainly do: I just haven't updated the build_ext command to use the new function interface yet, it's still using the UPPERCASE_GLOBALS interface). However, for installation, we certainly care about the difference between the platform-specific and platform-shared lib directories. Hence the 'plat_specific' argument to 'get_python_lib()'.
I'd also rename get_python_inc() to get_python_include(), but perhaps that's just me. ;)
Yeah, I think you're right. One change at a time, though... ;-) Greg -- Greg Ward - just another /P(erl|ython)/ hacker gward@python.net http://starship.python.net/~gward/ I'd rather have a bottle in front of me than have to have a frontal lobotomy.