On 4 Jan, 2007, at 17:56, Fred L. Drake, Jr. wrote:
On Thursday 04 January 2007 11:33, Martin v. Löwis wrote:For the python subdirectory, there is the issue that the frameworkincludes in OSX magically look for python.framework when searching forpython/foo.h, which they find, so that may get us the wrong version. Somebody would have to study the details here, first.If everything public gets included from Python.h, perhaps python/ object.h and friends could become pythonX.Y/object.h; I'm not sure this will solve the MacOS framework magic issue, though, not being a Mac OS developer.
That would solve the problem, however I don't think there is one. An experiment seems to indicate that the include path is prefered over the magic inclusion of framework headers (see the trace below). I haven't checked yet if the behaviour shown below is intentional, but I'd be surprised if it isn't.
$ mkdir include $ mkdir include/Python $ cat > include/Python/object.h <<EOF #error "my header included" EOF $ cat > demo.c <<-EOF #include <Python/object.h> EOF $ $ cc -c demo.c In file included from demo.c:1:/System/Library/Frameworks/Python.framework/Headers/object.h:227: error: parse error before ‘FILE’ /System/Library/Frameworks/Python.framework/Headers/object.h:353: error: parse error before ‘PyType_IsSubtype’ ... more errors removed, this clearly includes a header from the python framework
$ $ cc -I include -c t.c In file included from demo.c:1: include/Python/object.h:1:2: error: #error "my error"Therefore moving all headers into a directory named Python would cause no problems users that use the normal way of linking with python and would even allow users to use the python framework as a normal framework.
Ronald
-Fred -- Fred L. Drake, Jr. <fdrake at acm.org> _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-devUnsubscribe: http://mail.python.org/mailman/options/python-dev/ ronaldoussoren%40mac.com
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com