Python2.0 beta 2 on MacOSX/Darwin

Steven D. Majewski sdm7g at virginia.edu
Fri Sep 29 11:49:55 EDT 2000



If you want to do Mac OSX development without the developers CD,
"Darwin Tools on Mac OSX" at <http://www.darwinfo.org/>
has a link to the article:
<http://www.macaddict.com/content/news/2000/09/13/18709>
containing instructions and a shell script to merege the
Darwin development tools from the Darwin 1.0 distribution
into MacOSX. 


Python 2.0 beta 2 
<http://www.beopen.com/products/python2.0/BeOpen-Python-2.0b2.tar.gz>
builds on OSX or Darwin

configure options: 

  --with-dyld	# otherwise you get errors trying to include rld.h
		# I think thats for the old style next libraries.

  --with-suffix=.app  # or ".exe" or whatever
		# this  solves the case insensitivity problem on HFS+
		# The only clash is when make tries to move the
		# executable in "Python/python" to the parent dir.
		# this renames the executable with a suffix.

  --host=Darwin  # Not sure about this, but it may have stopped some 
		 # errors with trying to build Next platform specific code.

    ( maybe that's not doing what I thought as sys.platform still= 'next')




Modules:

bsdbm gets automagically added by configure (See notes in Modules/Setup)

threads are also automatically configured by default. 

crypt can be added in Modules/Setup -- no added library switches needed.

pyexpat: expat will build, but building a library using 'ar' , as in
  the note in Modules/Setup will give link errors. -- Use libtool instead:
   "libtool -static -o libexpat.a xmltol/*.o xmlparse/*.o"

(CoreFoundation, which is one of the OSX Frameworks also included in
Darwin, also has functions to convert to and from XML property lists,
but I don't believe that it exposes a full XML parser api. )



Limitations:

tests seem to run ok except that I get a :
test_re
Running tests on re.search and re.match
Running tests on re.sub
Running tests on symbolic references
Running tests on re.subn
Running tests on re.split
Running tests on re.findall
Running tests on re.match
Running tests on re.escape
Pickling a RegexObject instance
Test engine limitations
Segmentation fault



using configure --with-next-framework along with --with-dyld didn't work.
(Don't remember the error -- I'll try again)

Just uncommenting the "*shared*" in Modules/Setup gives this build error:

cc  -bundle -prebind  arraymodule.o  -o arraymodule.so
/usr/bin/ld: warning -prebind has no effect with -bundle
/usr/bin/ld: Undefined symbols:
_PyArg_Parse
_PyArg_ParseTuple
_PyDict_SetItemString
_PyErr_BadArgument
_PyErr_Clear
_PyErr_Format
_PyErr_NoMemory
_PyErr_Occurred



To Do:

Need to get dynamic loading of shared libraries working.
( dynamic loading + threading + pyexpat => Zope ought to port! ) 

Then need to work on Darwin|MacOSX specific libraries.

Tkinter, pyGtk and/or wxWindows under XFREE86 would be nice.
gtk has been ported to Darwin/XFREE86
Tcl has been ported but not, as far as I know Tk.
Is the Mac port of Tk carbonized ? If it were, it would allow
Tk on both Darwin under X11 and MacOSX under Carbon. 
( We really want Quartz, but it would be nice to have something
  that runs anywhere, and TK is probably the closest thing. 
  It was kind of strange to type "open PythonInterpreter" cd-ed to
  the OS9 MacPython folder and see OS9 boot up and run Python.
  I get an error message that my preferences are corrupt -- 
  I wonder if this is from the OSX  install on top of OS9 
  moving the system folder. But otherwise, things seem to 
  work -- I only tried EasyDialogs.test() and started a Tkinter
  window -- not a very complete test. ) 





---|  Steven D. Majewski   (804-982-0831)  <sdm7g at Virginia.EDU>  |---
---|  Department of Molecular Physiology and Biological Physics  |---
---|  University of Virginia             Health Sciences Center  |---
---|  P.O. Box 10011            Charlottesville, VA  22906-0011  |---
		"All operating systems want to be unix, 
		 All programming languages want to be lisp." 





More information about the Python-list mailing list