Reducing core dependencies for Python on OS X / distutils nit

Remove CoreServices / CoreFoundation dependencies in core http://python.org/sf/1035255 It came to my attention a couple weeks ago that Python unnecessarily links to a few frameworks on OS X, so I generated a patch that removed these dependencies. I would hope that this is uncontroversial. Presumably Jack has been really busy lately so I understand that this patch didn't make it into b1, but I would like to get it rolled into CVS by *somebody* after CVS is reopened so the final of Python 2.4 doesn't link to a bunch of frameworks for no reason, which potentially (not benchmarked) increases memory usage and startup time because the resultant Python.framework and python interpreter no longer have any explicit dependencies at all (just libSystem, which is linked in by default). -- distutils.util.get_platform() should include sys.version[:3] http://python.org/sf/1035703 On a side note, when I was playing with Python 2.4, I noticed that distutils doesn't create build directories that have the major Python version encoded in them, only the operating system information. This doesn't really make much sense, because extensions and bytecode aren't typically compatible between major versions! Nobody commented on this, but I'm willing to write a patch to create build directories with sys.version[:3] in them if it will be accepted... -bob

Bob Ippolito wrote:
distutils.util.get_platform() should include sys.version[:3] http://python.org/sf/1035703
On a side note, when I was playing with Python 2.4, I noticed that distutils doesn't create build directories that have the major Python version encoded in them, only the operating system information. This doesn't really make much sense, because extensions and bytecode aren't typically compatible between major versions! Nobody commented on this, but I'm willing to write a patch to create build directories with sys.version[:3] in them if it will be accepted...
are you sure about this? the build directories sure have version numbers in them on Unix and Windows: $ python setup.py build building 'sgmlop' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.1 -c sgmlop.c -o build/temp.linux-i686-2.1/sgmlop.o creating build/lib.linux-i686-2.1 gcc -shared build/temp.linux-i686-2.1/sgmlop.o -o build/lib.linux-i686-2.1/sgmlop.so $ python2.3 setup.py build building 'sgmlop' extension creating build/temp.linux-i686-2.3 gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.3 -c sgmlop.c -o build/temp.linux-i686-2.3/sgmlop.o creating build/lib.linux-i686-2.3 gcc -shared build/temp.linux-i686-2.3/sgmlop.o -o build/lib.linux-i686-2.3/sgmlop.so $ python1.5 setup.py build building 'sgmlop' extension creating build/temp.linux-i686-1.5 gcc -g -O2 -fPIC -I/usr/include/python1.5 -c sgmlop.c -o build/temp.linux-i686-1.5/sgmlop.o creating build/lib.linux-i686-1.5 gcc -shared build/temp.linux-i686-1.5/sgmlop.o -o build/lib.linux-i686-1.5/sgmlop.so
python setup.py build building 'sgmlop' extension creating build\temp.win32-2.3 creating build\temp.win32-2.3\Release C:\VisualStudio\VC98\BIN\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -IC:\python2 3\include -IC:\python23\PC /Tcsgmlop.c /Fobuild\temp.win32-2.3\Release\sgmlop.obj sgmlop.c creating build\lib.win32-2.3 C:\VisualStudio\VC98\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\pytho n23\libs /LIBPATH:C:\python23\PCBuild /EXPORT:initsgmlop build\temp.win32-2.3\Re lease\sgmlop.obj /OUT:build\lib.win32-2.3\sgmlop.pyd /IMPLIB:build\temp.win32-2. 3\Release\sgmlop.lib
(and so on) </F>

On Oct 16, 2004, at 11:23 AM, Fredrik Lundh wrote:
Bob Ippolito wrote:
distutils.util.get_platform() should include sys.version[:3] http://python.org/sf/1035703
On a side note, when I was playing with Python 2.4, I noticed that distutils doesn't create build directories that have the major Python version encoded in them, only the operating system information. This doesn't really make much sense, because extensions and bytecode aren't typically compatible between major versions! Nobody commented on this, but I'm willing to write a patch to create build directories with sys.version[:3] in them if it will be accepted...
are you sure about this? the build directories sure have version numbers in them on Unix and Windows:
I think you're right, I must've been mistaken by the fact that pure python source files end up in a lib dir not a build dir (I thought it was reusing pyc files, but those are generated at the installation location). My bad. -bob
participants (2)
-
Bob Ippolito
-
Fredrik Lundh