Commits

Anonymous committed d8ca51a

replaced build system. changed package name to be inline with the rest of python (all lower case).

  • Participants
  • Parent commits c98f329
  • Branches pyobjc-ancient

Comments (0)

Files changed (11)

+2001-03-17  Bill Bumgarner  <bbum@localhost>
+
+	* changed name of imported module to pyobjc to be more consistent
+	with other modules (that typically have an all lower case name).
+
+	* removed all old style Makefile and configuration stuff and moved
+	to using setup.py.   Setup.py proves to be much easier to handle
+	in a cross platform fashion and requires fewer steps to build the moudle.
+
 1998-08-18  Lele Gaifax  <lele@paci.nautilus>
 
 	* objc_support.h (ISCLASS): Check against META flag, an object is
 ***        specifying --with-objc to the configure script to use this.
 ***
 
-Statically
-==========
+***
+*** NOTE:  This no longer seems to be true under OSX Final Candidate
+*** (and future versions, I would suspect).   A build of python
+*** configured with './configure --with-suffix=.exe --with-threads
+*** --with-dyld' worked fine!
+***
 
-When freshly unpacked, the first task is to build the Makefile that
-will be used for all subsequent builds.  To do this, invoke the
-following make command:
+The module uses the distutils package included with Python 2.0 and
+beyond.   This package provides a single interface for building and
+packaging the module.   To see usage documentation for the module,
+issue the '--help' command:
 
-        make -f Makefile.pre.in boot
+% python setup.py --help
 
-maybe specifying PYTHON=python1.5 if you didn't installed it at all or
-used altinstall to do it.
+To see an inventory of building and packaging commands, issue the
+command:
 
-Once the Makefile is built, a statically linked Python executable
-containing all of the modules mentioned in Setup.in can be built by
-making the target 'static'.  By default, it will build a binary named
-`pyobjc'. Alternatively, the name of the resulting statically linked
-executable can be controlled by setting the TARGET variable's value
-from the make command line:
+% python setup.py --help-commands
 
-        make static
-or
-        make static TARGET=python-with-objc
-        
-Once done, try:
+The following command will build and install the pyobjc module:
 
-$ ./pyobjc 
-Python 1.5 (#11, Sun Jan 04 1998, 14:41:11)  [GCC NeXT DevKit-based
-CPP 4.0] on next4
->>> import ObjC
->>> dir (ObjC.runtime)
-['HashTable', 'List', 'NSAllDescendantPathsEnumerator', ...]
+% python setup.py install
 
-and you should get the list of known Objective-C classes.
-
-
-Shared Module
-=============
-
-An alternative way is to build a shared module: add a single line
-containing just "*shared*" at the top of Setup.in, *BEFORE* building
-the Makefile, or *YOU*HAVE*TO* run it again.
-
-To build the module in this way simply issue a "make" command, without
-the "static" argument. To test it of course you will have to load the
-normal interpreter, and import it as usual.
-
-$ python -v
-...
-Python 1.5 (#14, Thu Jan 08 1998, 22:14:25)  [GCC NeXT DevKit-based CPP 4.0] on next4
-Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
->>> import ObjC
-import ObjC # dynamically loaded from ObjC.so
-
+The setup.py system can also be used to create source and binary
+distribution archives automatically.
 
 Demos
 =====
+OC_PythonBundle.m
+OC_PythonInt.m
+OC_PythonObject.m
+OC_PythonString.m
+ObjC.m
+ObjCMethod.m
+ObjCObject.m
+ObjCPointer.m
+ObjCRuntime.m
+OC_PythonBundle.h
+OC_PythonInt.h
+OC_PythonObject.h
+OC_PythonString.h
+ObjC.h
+objc_support.h
+objc_support.m
+README
+setup.py
+.cvsignore
+BUGS
+ChangeLog
+FIXME
+INSTALL
+NEWS

Makefile.pre.in

-# Universal Unix Makefile for Python extensions
-# =============================================
-
-# Short Instructions
-# ------------------
-
-# 1. Build and install Python (1.5 or newer).
-# 2. "make -f Makefile.pre.in boot"
-# 3. "make"
-# You should now have a shared library.
-
-# Long Instructions
-# -----------------
-
-# Build *and install* the basic Python 1.5 distribution.  See the
-# Python README for instructions.  (This version of Makefile.pre.in
-# only withs with Python 1.5, alpha 3 or newer.)
-
-# Create a file Setup.in for your extension.  This file follows the
-# format of the Modules/Setup.in file; see the instructions there.
-# For a simple module called "spam" on file "spammodule.c", it can
-# contain a single line:
-#   spam spammodule.c
-# You can build as many modules as you want in the same directory --
-# just have a separate line for each of them in the Setup.in file.
-
-# If you want to build your extension as a shared library, insert a
-# line containing just the string
-#   *shared*
-# at the top of your Setup.in file.
-
-# Note that the build process copies Setup.in to Setup, and then works
-# with Setup.  It doesn't overwrite Setup when Setup.in is changed, so
-# while you're in the process of debugging your Setup.in file, you may
-# want to edit Setup instead, and copy it back to Setup.in later.
-# (All this is done so you can distribute your extension easily and
-# someone else can select the modules they actually want to build by
-# commenting out lines in the Setup file, without editing the
-# original.  Editing Setup is also used to specify nonstandard
-# locations for include or library files.)
-
-# Copy this file (Misc/Makefile.pre.in) to the directory containing
-# your extension.
-
-# Run "make -f Makefile.pre.in boot".  This creates Makefile
-# (producing Makefile.pre and sedscript as intermediate files) and
-# config.c, incorporating the values for sys.prefix, sys.exec_prefix
-# and sys.version from the installed Python binary.  For this to work,
-# the python binary must be on your path.  If this fails, try
-#   make -f Makefile.pre.in Makefile VERSION=1.5 installdir=<prefix>
-# where <prefix> is the prefix used to install Python for installdir
-# (and possibly similar for exec_installdir=<exec_prefix>).
-
-# Note: "make boot" implies "make clobber" -- it assumes that when you
-# bootstrap you may have changed platforms so it removes all previous
-# output files.
-
-# If you are building your extension as a shared library (your
-# Setup.in file starts with *shared*), run "make" or "make sharedmods"
-# to build the shared library files.  If you are building a statically
-# linked Python binary (the only solution of your platform doesn't
-# support shared libraries, and sometimes handy if you want to
-# distribute or install the resulting Python binary), run "make
-# python".
-
-# Note: Each time you edit Makefile.pre.in or Setup, you must run
-# "make Makefile" before running "make".
-
-# Hint: if you want to use VPATH, you can start in an empty
-# subdirectory and say (e.g.):
-#   make -f ../Makefile.pre.in boot srcdir=.. VPATH=..
-
-
-# === Bootstrap variables (edited through "make boot") ===
-
-# The prefix used by "make inclinstall libainstall" of core python
-installdir=	/usr/local
-
-# The exec_prefix used by the same
-exec_installdir=$(installdir)
-
-# Source directory and VPATH in case you want to use VPATH.
-# (You will have to edit these two lines yourself -- there is no
-# automatic support as the Makefile is not generated by
-# config.status.)
-srcdir=		.
-VPATH=		.
-
-# === Variables that you may want to customize (rarely) ===
-
-# (Static) build target
-TARGET=		python
-
-# Installed python binary (used only by boot target)
-PYTHON=		python
-
-# Add more -I and -D options here
-CFLAGS=		$(OPT) -I$(INCLUDEPY) -I$(EXECINCLUDEPY) $(DEFS)
-
-# These two variables can be set in Setup to merge extensions.
-# See example[23].
-BASELIB=	
-BASESETUP=	
-
-# === Variables set by makesetup ===
-
-MODOBJS=	_MODOBJS_
-MODLIBS=	_MODLIBS_
-
-# === Definitions added by makesetup ===
-
-# === Variables from configure (through sedscript) ===
-
-VERSION=	@VERSION@
-CC=		@CC@
-CXX=		@CXX@
-LINKCC=		@LINKCC@
-SGI_ABI=	@SGI_ABI@
-OPT=		@OPT@
-LDFLAGS=	@LDFLAGS@
-LDLAST=		@LDLAST@
-DEFS=		@DEFS@
-LIBS=		@LIBS@
-LIBM=		@LIBM@
-LIBC=		@LIBC@
-RANLIB=		@RANLIB@
-MACHDEP=	@MACHDEP@
-SO=		@SO@
-LDSHARED=	@LDSHARED@
-CCSHARED=	@CCSHARED@
-LINKFORSHARED=	@LINKFORSHARED@
-#@SET_CCC@
-
-# Install prefix for architecture-independent files
-prefix=		/usr/local
-
-# Install prefix for architecture-dependent files
-exec_prefix=	$(prefix)
-
-# Uncomment the following two lines for AIX
-#LINKCC= 	$(LIBPL)/makexp_aix $(LIBPL)/python.exp "" $(LIBRARY); $(PURIFY) $(CC)
-#LDSHARED=	$(LIBPL)/ld_so_aix $(CC) -bI:$(LIBPL)/python.exp
-
-# === Fixed definitions ===
-
-# Shell used by make (some versions default to the login shell, which is bad)
-SHELL=		/bin/sh
-
-# Expanded directories
-BINDIR=		$(exec_installdir)/bin
-LIBDIR=		$(exec_prefix)/lib
-MANDIR=		$(installdir)/man
-INCLUDEDIR=	$(installdir)/include
-SCRIPTDIR=	$(prefix)/lib
-
-# Detailed destination directories
-BINLIBDEST=	$(LIBDIR)/python$(VERSION)
-LIBDEST=	$(SCRIPTDIR)/python$(VERSION)
-INCLUDEPY=	$(INCLUDEDIR)/python$(VERSION)
-EXECINCLUDEPY=	$(exec_installdir)/include/python$(VERSION)
-LIBP=		$(exec_installdir)/lib/python$(VERSION)
-DESTSHARED=	$(BINLIBDEST)/site-packages
-
-LIBPL=		$(LIBP)/config
-
-PYTHONLIBS=	$(LIBPL)/libpython$(VERSION).a
-
-MAKESETUP=	$(LIBPL)/makesetup
-MAKEFILE=	$(LIBPL)/Makefile
-CONFIGC=	$(LIBPL)/config.c
-CONFIGCIN=	$(LIBPL)/config.c.in
-SETUP=		$(LIBPL)/Setup.config $(LIBPL)/Setup.local $(LIBPL)/Setup
-
-SYSLIBS=	$(LIBM) $(LIBC)
-
-ADDOBJS=	$(LIBPL)/python.o config.o
-
-# Portable install script (configure doesn't always guess right)
-INSTALL=	$(LIBPL)/install-sh -c
-# Shared libraries must be installed with executable mode on some systems;
-# rather than figuring out exactly which, we always give them executable mode.
-# Also, making them read-only seems to be a good idea...
-INSTALL_SHARED=	${INSTALL} -m 555
-
-# === Fixed rules ===
-
-# Default target.  This builds shared libraries only
-default:	sharedmods
-
-# Build everything
-all:		static sharedmods
-
-# Build shared libraries from our extension modules
-sharedmods:	$(SHAREDMODS)
-
-# Build a static Python binary containing our extension modules
-static:		$(TARGET)
-$(TARGET):	$(ADDOBJS) lib.a $(PYTHONLIBS) Makefile $(BASELIB)
-		$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) \
-		 $(ADDOBJS) lib.a $(PYTHONLIBS) \
-		 $(LINKPATH) $(BASELIB) $(MODLIBS) $(LIBS) $(SYSLIBS) \
-		 -o $(TARGET) $(LDLAST)
-
-install:	sharedmods
-		if test ! -d $(DESTSHARED) ; then \
-			mkdir $(DESTSHARED) ; else true ; fi
-		-for i in X $(SHAREDMODS); do \
-			if test $$i != X; \
-			then $(INSTALL_SHARED) $$i $(DESTSHARED)/$$i; \
-			fi; \
-		done
-
-# Build the library containing our extension modules
-lib.a:		$(MODOBJS)
-		-rm -f lib.a
-		ar cr lib.a $(MODOBJS)
-		-$(RANLIB) lib.a 
-
-# This runs makesetup *twice* to use the BASESETUP definition from Setup
-config.c Makefile:	Makefile.pre Setup $(BASESETUP) $(MAKESETUP)
-		$(MAKESETUP) \
-		 -m Makefile.pre -c $(CONFIGCIN) Setup -n $(BASESETUP) $(SETUP)
-		$(MAKE) -f Makefile do-it-again
-
-# Internal target to run makesetup for the second time
-do-it-again:
-		$(MAKESETUP) \
-		 -m Makefile.pre -c $(CONFIGCIN) Setup -n $(BASESETUP) $(SETUP)
-
-# Make config.o from the config.c created by makesetup
-config.o:	config.c
-		$(CC) $(CFLAGS) -c config.c
-
-# Setup is copied from Setup.in *only* if it doesn't yet exist
-Setup:
-		cp $(srcdir)/Setup.in Setup
-
-# Make the intermediate Makefile.pre from Makefile.pre.in
-Makefile.pre: Makefile.pre.in sedscript
-		sed -f sedscript $(srcdir)/Makefile.pre.in >Makefile.pre
-
-# Shortcuts to make the sed arguments on one line
-P=prefix
-E=exec_prefix
-H=Generated automatically from Makefile.pre.in by sedscript.
-L=LINKFORSHARED
-
-# Make the sed script used to create Makefile.pre from Makefile.pre.in
-sedscript:	$(MAKEFILE)
-	sed -n \
-	 -e '1s/.*/1i\\/p' \
-	 -e '2s%.*%# $H%p' \
-	 -e '/^VERSION=/s/^VERSION=[ 	]*\(.*\)/s%@VERSION[@]%\1%/p' \
-	 -e '/^CC=/s/^CC=[ 	]*\(.*\)/s%@CC[@]%\1%/p' \
-	 -e '/^CXX=/s/^CXX=[ 	]*\(.*\)/s%@CXX[@]%\1%/p' \
-	 -e '/^CCC=/s/^CCC=[ 	]*\(.*\)/s%#@SET_CCC[@]%CCC=\1%/p' \
-	 -e '/^LINKCC=/s/^LINKCC=[ 	]*\(.*\)/s%@LINKCC[@]%\1%/p' \
-	 -e '/^OPT=/s/^OPT=[ 	]*\(.*\)/s%@OPT[@]%\1%/p' \
-	 -e '/^LDFLAGS=/s/^LDFLAGS=[ 	]*\(.*\)/s%@LDFLAGS[@]%\1%/p' \
-	 -e '/^LDLAST=/s/^LDLAST=[      ]*\(.*\)/s%@LDLAST[@]%\1%/p' \
-	 -e '/^DEFS=/s/^DEFS=[ 	]*\(.*\)/s%@DEFS[@]%\1%/p' \
-	 -e '/^LIBS=/s/^LIBS=[ 	]*\(.*\)/s%@LIBS[@]%\1%/p' \
-	 -e '/^LIBM=/s/^LIBM=[ 	]*\(.*\)/s%@LIBM[@]%\1%/p' \
-	 -e '/^LIBC=/s/^LIBC=[ 	]*\(.*\)/s%@LIBC[@]%\1%/p' \
-	 -e '/^RANLIB=/s/^RANLIB=[ 	]*\(.*\)/s%@RANLIB[@]%\1%/p' \
-	 -e '/^MACHDEP=/s/^MACHDEP=[ 	]*\(.*\)/s%@MACHDEP[@]%\1%/p' \
-	 -e '/^SO=/s/^SO=[ 	]*\(.*\)/s%@SO[@]%\1%/p' \
-	 -e '/^LDSHARED=/s/^LDSHARED=[ 	]*\(.*\)/s%@LDSHARED[@]%\1%/p' \
-	 -e '/^CCSHARED=/s/^CCSHARED=[ 	]*\(.*\)/s%@CCSHARED[@]%\1%/p' \
-	 -e '/^SGI_ABI=/s/^SGI_ABI=[ 	]*\(.*\)/s%@SGI_ABI[@]%\1%/p' \
-	 -e '/^$L=/s/^$L=[ 	]*\(.*\)/s%@$L[@]%\1%/p' \
-	 -e '/^$P=/s/^$P=\(.*\)/s%^$P=.*%$P=\1%/p' \
-	 -e '/^$E=/s/^$E=\(.*\)/s%^$E=.*%$E=\1%/p' \
-	 $(MAKEFILE) >sedscript
-	echo "/^#@SET_CCC@/d" >>sedscript
-	echo "/^installdir=/s%=.*%=	$(installdir)%" >>sedscript
-	echo "/^exec_installdir=/s%=.*%=$(exec_installdir)%" >>sedscript
-	echo "/^srcdir=/s%=.*%=		$(srcdir)%" >>sedscript
-	echo "/^VPATH=/s%=.*%=		$(VPATH)%" >>sedscript
-	echo "/^LINKPATH=/s%=.*%=	$(LINKPATH)%" >>sedscript
-	echo "/^BASELIB=/s%=.*%=	$(BASELIB)%" >>sedscript
-	echo "/^BASESETUP=/s%=.*%=	$(BASESETUP)%" >>sedscript
-
-# Bootstrap target
-boot:	clobber
-	VERSION=`$(PYTHON) -c "import sys; print sys.version[:3]"`; \
-	installdir=`$(PYTHON) -c "import sys; print sys.prefix"`; \
-	exec_installdir=`$(PYTHON) -c "import sys; print sys.exec_prefix"`; \
-	$(MAKE) -f $(srcdir)/Makefile.pre.in VPATH=$(VPATH) srcdir=$(srcdir) \
-		VERSION=$$VERSION \
-		installdir=$$installdir \
-		exec_installdir=$$exec_installdir \
-		Makefile
-
-# Handy target to remove intermediate files and backups
-clean:
-		-rm -f *.o *~
-
-# Handy target to remove everything that is easily regenerated
-clobber:	clean
-		-rm -f *.a tags TAGS config.c Makefile.pre $(TARGET) sedscript
-		-rm -f *.so *.sl so_locations
-
-
-# Handy target to remove everything you don't want to distribute
-distclean:	clobber
-		-rm -f Makefile Setup

Makefile.pre.in-old

-# Universal Unix Makefile for Python extensions
-# =============================================
-
-# Lele Gaifax on 8 Dec 1997: slightly edited to fit PyObjC needs.
-#  - Uses makesetup in the $(srcdir) directory, since it supports ObjC.
-#  - Added $(LINKFORSHARED) to the link command.
-
-# Short Instructions
-# ------------------
-
-# 1. Build and install Python (1.5 or newer).
-# 2. "make -f Makefile.pre.in boot"
-# 3. "make"
-# You should now have a shared library.
-
-# Long Instructions
-# -----------------
-
-# Build *and install* the basic Python 1.5 distribution.  See the
-# Python README for instructions.  (This version of Makefile.pre.in
-# only withs with Python 1.5, alpha 3 or newer.)
-
-# Create a file Setup.in for your extension.  This file follows the
-# format of the Modules/Setup.in file; see the instructions there.
-# For a simple module called "spam" on file "spammodule.c", it can
-# contain a single line:
-#   spam spammodule.c
-# You can build as many modules as you want in the same directory --
-# just have a separate line for each of them in the Setup.in file.
-
-# If you want to build your extension as a shared library, insert a
-# line containing just the string
-#   *shared*
-# at the top of your Setup.in file.
-
-# Note that the build process copies Setup.in to Setup, and then works
-# with Setup.  It doesn't overwrite Setup when Setup.in is changed, so
-# while you're in the process of debugging your Setup.in file, you may
-# want to edit Setup instead, and copy it back to Setup.in later.
-# (All this is done so you can distribute your extension easily and
-# someone else can select the modules they actually want to build by
-# commenting out lines in the Setup file, without editing the
-# original.  Editing Setup is also used to specify nonstandard
-# locations for include or library files.)
-
-# Copy this file (Misc/Makefile.pre.in) to the directory containing
-# your extension.
-
-# Run "make -f Makefile.pre.in boot".  This creates Makefile
-# (producing Makefile.pre and sedscript as intermediate files) and
-# config.c, incorporating the values for sys.prefix, sys.exec_prefix
-# and sys.version from the installed Python binary.  For this to work,
-# the python binary must be on your path.  If this fails, try
-#   make -f Makefile.pre.in Makefile VERSION=1.5 installdir=<prefix>
-# where <prefix> is the prefix used to install Python for installdir
-# (and possibly similar for exec_installdir=<exec_prefix>).
-
-# Note: "make boot" implies "make clobber" -- it assumes that when you
-# bootstrap you may have changed platforms so it removes all previous
-# output files.
-
-# If you are building your extension as a shared library (your
-# Setup.in file starts with *shared*), run "make" or "make sharedmods"
-# to build the shared library files.  If you are building a statically
-# linked Python binary (the only solution of your platform doesn't
-# support shared libraries, and sometimes handy if you want to
-# distribute or install the resulting Python binary), run "make
-# python".
-
-# Note: Each time you edit Makefile.pre.in or Setup, you must run
-# "make Makefile" before running "make".
-
-# Hint: if you want to use VPATH, you can start in an empty
-# subdirectory and say (e.g.):
-#   make -f ../Makefile.pre.in boot srcdir=.. VPATH=..
-
-
-# === Bootstrap variables (edited through "make boot") ===
-
-# The prefix used by "make inclinstall libainstall" of core python
-installdir=	/usr/local
-
-# The exec_prefix used by the same
-exec_installdir=$(installdir)
-
-# Source directory and VPATH in case you want to use VPATH.
-# (You will have to edit these two lines yourself -- there is no
-# automatic support as the Makefile is not generated by
-# config.status.)
-srcdir=		.
-VPATH=		.
-
-# === Variables that you may want to customize (rarely) ===
-
-# (Static) build target
-TARGET=		pyobjc
-
-# Installed python binary (used only by boot target)
-PYTHON=		python
-
-# Add more -I and -D options here
-CFLAGS=		$(OPT) -I$(INCLUDEPY) -I$(EXECINCLUDEPY) $(DEFS)
-
-# These two variables can be set in Setup to merge extensions.
-# See example[23].
-BASELIB=	
-BASESETUP=	
-
-# === Variables set by makesetup ===
-
-MODOBJS=	_MODOBJS_
-MODLIBS=	_MODLIBS_
-
-# === Definitions added by makesetup ===
-
-# === Variables from configure (through sedscript) ===
-
-VERSION=	@VERSION@
-CC=		@CC@
-LINKCC=		@LINKCC@
-SGI_ABI=	@SGI_ABI@
-OPT=		@OPT@
-LDFLAGS=	@LDFLAGS@
-DEFS=		@DEFS@
-LIBS=		@LIBS@
-LIBM=		@LIBM@
-LIBC=		@LIBC@
-RANLIB=		@RANLIB@
-MACHDEP=	@MACHDEP@
-SO=		@SO@
-LDSHARED=	@LDSHARED@
-CCSHARED=	@CCSHARED@
-LINKFORSHARED=	@LINKFORSHARED@
-#@SET_CCC@
-
-# Install prefix for architecture-independent files
-prefix=		/usr/local
-
-# Install prefix for architecture-dependent files
-exec_prefix=	$(prefix)
-
-# === Fixed definitions ===
-
-# Shell used by make (some versions default to the login shell, which is bad)
-SHELL=		/bin/sh
-
-# Expanded directories
-BINDIR=		$(exec_installdir)/bin
-LIBDIR=		$(exec_prefix)/lib
-MANDIR=		$(installdir)/man
-INCLUDEDIR=	$(installdir)/include
-SCRIPTDIR=	$(prefix)/lib
-
-# Detailed destination directories
-BINLIBDEST=	$(LIBDIR)/python$(VERSION)
-LIBDEST=	$(SCRIPTDIR)/python$(VERSION)
-INCLUDEPY=	$(INCLUDEDIR)/python$(VERSION)
-EXECINCLUDEPY=	$(exec_installdir)/include/python$(VERSION)
-LIBP=		$(exec_installdir)/lib/python$(VERSION)
-DESTSHARED=	$(BINLIBDEST)/site-packages
-
-LIBPL=		$(LIBP)/config
-
-PYTHONLIBS=	$(LIBPL)/libpython$(VERSION).a
-
-MAKESETUP=	$(srcdir)/makesetup
-MAKEFILE=	$(LIBPL)/Makefile
-CONFIGC=	$(LIBPL)/config.c
-CONFIGCIN=	$(LIBPL)/config.c.in
-SETUP=		$(LIBPL)/Setup
-
-SYSLIBS=	$(LIBM) $(LIBC)
-
-ADDOBJS=	$(LIBPL)/python.o config.o
-
-# Portable install script (configure doesn't always guess right)
-INSTALL=	$(LIBPL)/install-sh -c
-# Shared libraries must be installed with executable mode on some systems;
-# rather than figuring out exactly which, we always give them executable mode.
-# Also, making them read-only seems to be a good idea...
-INSTALL_SHARED=	${INSTALL} -m 555
-
-# === Fixed rules ===
-
-# Default target.  This builds shared libraries only
-default:	sharedmods
-
-# Build everything
-all:		static sharedmods
-
-# Build shared libraries from our extension modules
-sharedmods:	$(SHAREDMODS)
-
-# Build a static Python binary containing our extension modules
-static:		$(TARGET)
-$(TARGET):	$(ADDOBJS) lib.a $(PYTHONLIBS) Makefile $(BASELIB)
-		$(OCC) $(LDFLAGS) $(ADDOBJS) lib.a $(PYTHONLIBS) \
-		 $(LINKPATH) $(BASELIB) $(MODLIBS) $(LIBS) $(SYSLIBS) \
-		 $(LINKFORSHARED) -o $(TARGET)
-
-install:	sharedmods
-		if test ! -d $(DESTSHARED) ; then \
-			mkdir $(DESTSHARED) ; else true ; fi
-		-for i in X $(SHAREDMODS); do \
-			if test $$i != X; \
-			then $(INSTALL_SHARED) $$i $(DESTSHARED)/$$i; \
-			fi; \
-		done
-
-# Build the library containing our extension modules
-lib.a:		$(MODOBJS)
-		-rm -f lib.a
-		ar cr lib.a $(MODOBJS)
-		-$(RANLIB) lib.a 
-
-# This runs makesetup *twice* to use the BASESETUP definition from Setup
-config.c Makefile:	Makefile.pre Setup $(BASESETUP) $(MAKESETUP)
-		$(MAKESETUP) \
-		 -m Makefile.pre -c $(CONFIGCIN) Setup -n $(BASESETUP) $(SETUP)
-		$(MAKE) -f Makefile do-it-again
-
-# Internal target to run makesetup for the second time
-do-it-again:
-		$(MAKESETUP) \
-		 -m Makefile.pre -c $(CONFIGCIN) Setup -n $(BASESETUP) $(SETUP)
-
-# Make config.o from the config.c created by makesetup
-config.o:	config.c
-		$(CC) $(CFLAGS) -c config.c
-
-# Setup is copied from Setup.in *only* if it doesn't yet exist
-Setup:
-		cp $(srcdir)/Setup.in Setup
-
-# Make the intermediate Makefile.pre from Makefile.pre.in
-Makefile.pre: Makefile.pre.in sedscript
-		sed -f sedscript $(srcdir)/Makefile.pre.in >Makefile.pre
-
-# Shortcuts to make the sed arguments on one line
-P=prefix
-E=exec_prefix
-H=Generated automatically from Makefile.pre.in by sedscript.
-L=LINKFORSHARED
-
-# Make the sed script used to create Makefile.pre from Makefile.pre.in
-sedscript:	$(MAKEFILE)
-	sed -n \
-	 -e '1s/.*/1i\\/p' \
-	 -e '2s%.*%# $H%p' \
-	 -e '/^VERSION=/s/^VERSION=[ 	]*\(.*\)/s%@VERSION[@]%\1%/p' \
-	 -e '/^CC=/s/^CC=[ 	]*\(.*\)/s%@CC[@]%\1%/p' \
-	 -e '/^CCC=/s/^CCC=[ 	]*\(.*\)/s%#@SET_CCC[@]%CCC=\1%/p' \
-	 -e '/^LINKCC=/s/^LINKCC=[ 	]*\(.*\)/s%@LINKCC[@]%\1%/p' \
-	 -e '/^OPT=/s/^OPT=[ 	]*\(.*\)/s%@OPT[@]%\1%/p' \
-	 -e '/^LDFLAGS=/s/^LDFLAGS=[ 	]*\(.*\)/s%@LDFLAGS[@]%\1%/p' \
-	 -e '/^DEFS=/s/^DEFS=[ 	]*\(.*\)/s%@DEFS[@]%\1%/p' \
-	 -e '/^LIBS=/s/^LIBS=[ 	]*\(.*\)/s%@LIBS[@]%\1%/p' \
-	 -e '/^LIBM=/s/^LIBM=[ 	]*\(.*\)/s%@LIBM[@]%\1%/p' \
-	 -e '/^LIBC=/s/^LIBC=[ 	]*\(.*\)/s%@LIBC[@]%\1%/p' \
-	 -e '/^RANLIB=/s/^RANLIB=[ 	]*\(.*\)/s%@RANLIB[@]%\1%/p' \
-	 -e '/^MACHDEP=/s/^MACHDEP=[ 	]*\(.*\)/s%@MACHDEP[@]%\1%/p' \
-	 -e '/^SO=/s/^SO=[ 	]*\(.*\)/s%@SO[@]%\1%/p' \
-	 -e '/^LDSHARED=/s/^LDSHARED=[ 	]*\(.*\)/s%@LDSHARED[@]%\1%/p' \
-	 -e '/^CCSHARED=/s/^CCSHARED=[ 	]*\(.*\)/s%@CCSHARED[@]%\1%/p' \
-	 -e '/^$L=/s/^$L=[ 	]*\(.*\)/s%@$L[@]%\1%/p' \
-	 -e '/^$P=/s/^$P=\(.*\)/s%^$P=.*%$P=\1%/p' \
-	 -e '/^$E=/s/^$E=\(.*\)/s%^$E=.*%$E=\1%/p' \
-	 $(MAKEFILE) >sedscript
-	echo "/^#@SET_CCC@/d" >>sedscript
-	echo "/^installdir=/s%=.*%=	$(installdir)%" >>sedscript
-	echo "/^exec_installdir=/s%=.*%=$(exec_installdir)%" >>sedscript
-	echo "/^srcdir=/s%=.*%=		$(srcdir)%" >>sedscript
-	echo "/^VPATH=/s%=.*%=		$(VPATH)%" >>sedscript
-	echo "/^LINKPATH=/s%=.*%=	$(LINKPATH)%" >>sedscript
-	echo "/^BASELIB=/s%=.*%=	$(BASELIB)%" >>sedscript
-	echo "/^BASESETUP=/s%=.*%=	$(BASESETUP)%" >>sedscript
-
-# Bootstrap target
-boot:	clobber
-	VERSION=`$(PYTHON) -c "import sys; print sys.version[:3]"`; \
-	installdir=`$(PYTHON) -c "import sys; print sys.prefix"`; \
-	exec_installdir=`$(PYTHON) -c "import sys; print sys.exec_prefix"`; \
-	$(MAKE) -f $(srcdir)/Makefile.pre.in VPATH=$(VPATH) srcdir=$(srcdir) \
-		VERSION=$$VERSION \
-		installdir=$$installdir \
-		exec_installdir=$$exec_installdir \
-		Makefile
-
-# Handy target to remove intermediate files and backups
-clean:
-		-rm -f *.o *~
-
-# Handy target to remove everything that is easily regenerated
-clobber:	clean
-		-rm -f *.a tags TAGS config.c Makefile.pre $(TARGET) sedscript
-		-rm -f *.so *.sl so_locations
-
-
-# Handy target to remove everything you don't want to distribute
-distclean:	clobber
-		-rm -f Makefile Setup
 
 WHAT'S NEW:
 
+Version 2001-03-17 (March 17, 2001:
+
+- moved to using distutils setup.py (requires small patch to distutils
+  that has been submitted against python 2.1b1)
+
 Version 2000-11-14 (November 14, 2000):
 
 - GNU_RUNTIME is likely completely broken
 + (void) initModule
 #else
 void
-initObjC (void)
+initpyobjc (void)
 #endif
 {
   PyObject *m, *d;
   extern void ObjCObject_initialize (void);
 
-  m = Py_InitModule4 ("ObjC", ObjC_methods, ObjC_doc, NULL, PYTHON_API_VERSION);
+  m = Py_InitModule4 ("pyobjc", ObjC_methods, ObjC_doc, NULL, PYTHON_API_VERSION);
   d = PyModule_GetDict (m);
 
-  ObjC_Error = PyString_FromString ("ObjC.error");
+  ObjC_Error = PyString_FromString ("pyobjc.error");
   PyDict_SetItemString (d, "error", ObjC_Error);
 
   PyDict_SetItemString (d, "runtime", (PyObject *) ObjCRuntime_new());
   ObjCObject_initialize();
   
   if (PyErr_Occurred())
-    Py_FatalError ("can't initialize module ObjC");
+    Py_FatalError ("can't initialize module pyobjc");
   
 #if defined(WITH_THREAD) && !defined(GNU_RUNTIME)
   objc_setMultithreaded (1);
                 {
                   char faster_name[200];
                   
-                  fprintf (stderr, "PyObjC Warning: method `%s' matches `%s',\n\t", name, meth_name);
+                  fprintf (stderr, "pyobjc Warning: method `%s' matches `%s',\n\t", name, meth_name);
                   
                   pythonify_objc_message (meth_name, faster_name, PYTHONIFICATION_FIRST_TRY);
                   

Setup.in

-# Objective-C Interface Module
-###############################
-
-*shared*
-
-# Compile with NeXT cc and ObjC runtime.
-CCC=cc -Wall -ObjC
-ObjC	ObjC.m \
-	ObjCMethod.m \
-	ObjCObject.m \
-	ObjCPointer.m \
-	ObjCRuntime.m \
-	objc_support.m \
-	OC_PythonBundle.m \
-	OC_PythonInt.m \
-	OC_PythonObject.m \
-	OC_PythonString.m \
-	-framework Foundation
-
-# Compile with GNU gcc, ObjC runtime and GNUstep Base.
-# If you aren't on NeXTSTEP, comment out ``-fgnu-runtime''.
-#OCC=egcs -DGNU_RUNTIME -fgnu-runtime -I$(GNUSTEP_SYSTEM_ROOT)/Headers -I$(GNUSTEP_SYSTEM_ROOT)/Headers/gnustep
-#ObjC	ObjC.m \
-#	ObjCMethod.m \
-#	ObjCObject.m \
-#	ObjCPointer.m \
-#	ObjCRuntime.m \
-#	objc_support.m \
-#	OC_PythonBundle.m \
-#	OC_PythonInt.m \
-#	OC_PythonObject.m \
-#	OC_PythonString.m \
-#	-L$(GNUSTEP_SYSTEM_ROOT)/Libraries/$(GNUSTEP_HOST_CPU)/$(GNUSTEP_HOST_OS)/$(LIBRARY_COMBO) \
-#	-lgnustep-base_d -lobjc -lpthread
-

Setup.in-old

-# Objective-C Interface Module
-###############################
-
-# Compile with NeXT cc and ObjC runtime.
-OCC=cc -Wall -ObjC
-ObjC	ObjC.m \
-	ObjCMethod.m \
-	ObjCObject.m \
-	ObjCPointer.m \
-	ObjCRuntime.m \
-	objc_support.m \
-	OC_PythonBundle.m \
-	OC_PythonInt.m \
-	OC_PythonObject.m \
-	OC_PythonString.m
-
-# Compile with GNU gcc, ObjC runtime and GNUstep Base.
-# If you aren't on NeXTSTEP, comment out ``-fgnu-runtime''.
-#OCC=egcs -DGNU_RUNTIME -fgnu-runtime -I$(GNUSTEP_SYSTEM_ROOT)/Headers -I$(GNUSTEP_SYSTEM_ROOT)/Headers/gnustep
-#ObjC	ObjC.m \
-#	ObjCMethod.m \
-#	ObjCObject.m \
-#	ObjCPointer.m \
-#	ObjCRuntime.m \
-#	objc_support.m \
-#	OC_PythonBundle.m \
-#	OC_PythonInt.m \
-#	OC_PythonObject.m \
-#	OC_PythonString.m \
-#	-L$(GNUSTEP_SYSTEM_ROOT)/Libraries/$(GNUSTEP_HOST_CPU)/$(GNUSTEP_HOST_OS)/$(LIBRARY_COMBO) \
-#	-lgnustep-base_d -lobjc -lpthread
-
+#!/usr/bin/env python.exe
+
+from distutils.core import setup, Extension
+
+sourceFiles = ["OC_PythonBundle.m",
+               "OC_PythonInt.m",
+               "OC_PythonObject.m",
+               "OC_PythonString.m",
+               "ObjC.m",
+               "ObjCMethod.m",
+               "ObjCObject.m",
+               "ObjCPointer.m",
+               "ObjCRuntime.m",
+               "objc_support.m"]
+
+try:
+    setup (name = "pyobjc",
+           version = "0.9",
+           description = "Python<->ObjC Interoperability Module",
+           author = "bbum, SteveM, many others stretching back through the reaches of time...",
+           author_email = "bbum@codefab.com",
+           url = "http://pyobjc.sourceforge.net/",
+           ext_modules = [Extension("pyobjc", sourceFiles)],
+           )
+except:
+    import sys
+    import traceback
+    traceback.print_exc()