[Pythonmac-SIG] Python on Mac OS X

Doug Wyatt doug@sonosphere.com
Mon, 22 May 2000 12:49:34 -0400


At 13:18 +0200 5/22/00, Jack Jansen wrote:
>This is easy to fix: there is a define in (I think)dynload_next.c to
>make it switch between two types of dynamic loading. Pick the
>non-default one and it'll work. I can't check the exact details right
>now because I'm away from the office and my MacOSX machine is running
>MacOS9 at the moment.

Yes, I just added

	#define WITH_DYLD	// dsw

to the top of dynload_next.c and it compiled.


Next problem ...

At 23:51 +0200 5/20/00, Jack Jansen wrote:
>This is basically already there: take the standard Python distribution
>(the unix one) and compile it. There were one or two minor gotchas,
>the main one I remember being that if you run on an HFS+ disk (as
>opposed to a UFS disk) there's a name clash between the eventual
>executable "python" and the "Python" directory. That's easily fixed in
>the Makefile by setting the EXE=".exe" variable.

Indeed.  That has to be done in the top-level and the Modules Makefile's.

Darn, why did I choose to make my disk HFS+?!

And in the Modules makefile,

# This target is used by the master Makefile to link the final binary.
link:		$(MAINOBJ)
		$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) $(MAINOBJ) \
		  $(LDLIBRARY) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python$(EXE) $(LDLAST)
		mv python$(EXE) ../python$(EXE)

I had to add $(EXE) after -o.


Now during "make install"...

export PATH; PATH="`pwd`:$PATH"; \
         export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
         cd ./Lib/plat-next; ./regen
python ../../Tools/scripts/h2py.py /usr/include/fcntl.h
./regen: permission denied: python [3]

The regen script just executes python, not python.exe.

So I executed 'alias python /usr/local/bin/python1.6.exe' and tried 
again -- that worked.

After it was all done I snipped the .exe's off the executables in 
/usr/local/bin.

4.4 BSD (wyatdo) (ttyp0)

login: doug
Password:
Welcome to Darwin!
[wyatdo:~] doug% python
Python 1.6a2 (#8, 05/22/00, 12:34:49)  [GCC Apple DevKit-based CPP 5.0] on next
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>>

Cool!

Doug


-- 
Doug Wyatt                             doug@sonosphere.com
http://www.sonosphere.com/  <- new: review of Mother Mallard
                                at the Smithsonian