[Python-checkins] python/dist/src setup.py,1.96,1.97

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Wed, 26 Jun 2002 08:44:32 -0700


Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv16013

Modified Files:
	setup.py 
Log Message:
Fixed a few showstoppers in the process of making MacPython use setup.py to build it's exension modules (in stead of relying on a private mechanism). It definitely doesn't work yet, but it looks promising.

Index: setup.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/setup.py,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -d -r1.96 -r1.97
*** setup.py	24 Jun 2002 20:27:33 -0000	1.96
--- setup.py	26 Jun 2002 15:44:30 -0000	1.97
***************
*** 19,23 ****
      1) 'dir' is not already in 'dirlist'
      2) 'dir' actually exists, and is a directory."""
!     if os.path.isdir(dir) and dir not in dirlist:
          dirlist.insert(0, dir)
  
--- 19,23 ----
      1) 'dir' is not already in 'dirlist'
      2) 'dir' actually exists, and is a directory."""
!     if dir is not None and os.path.isdir(dir) and dir not in dirlist:
          dirlist.insert(0, dir)
  
***************
*** 100,104 ****
          # Platform-dependent module source and include directories
          platform = self.get_platform()
!         if platform == 'darwin':
              # Mac OS X also includes some mac-specific modules
              macmoddir = os.path.join(os.getcwd(), srcdir, 'Mac/Modules')
--- 100,104 ----
          # Platform-dependent module source and include directories
          platform = self.get_platform()
!         if platform in ('darwin', 'mac'):
              # Mac OS X also includes some mac-specific modules
              macmoddir = os.path.join(os.getcwd(), srcdir, 'Mac/Modules')
***************
*** 127,144 ****
                  self.extensions.remove(ext)
  
!         # Parse Modules/Setup to figure out which modules are turned
!         # on in the file.
!         input = text_file.TextFile('Modules/Setup', join_lines=1)
!         remove_modules = []
!         while 1:
!             line = input.readline()
!             if not line: break
!             line = line.split()
!             remove_modules.append( line[0] )
!         input.close()
! 
!         for ext in self.extensions[:]:
!             if ext.name in remove_modules:
!                 self.extensions.remove(ext)
  
          # When you run "make CC=altcc" or something similar, you really want
--- 127,145 ----
                  self.extensions.remove(ext)
  
!         if platform != 'mac':
!             # Parse Modules/Setup to figure out which modules are turned
!             # on in the file.
!             input = text_file.TextFile('Modules/Setup', join_lines=1)
!             remove_modules = []
!             while 1:
!                 line = input.readline()
!                 if not line: break
!                 line = line.split()
!                 remove_modules.append( line[0] )
!             input.close()
!     
!             for ext in self.extensions[:]:
!                 if ext.name in remove_modules:
!                     self.extensions.remove(ext)
  
          # When you run "make CC=altcc" or something similar, you really want
***************
*** 259,263 ****
          # Check for MacOS X, which doesn't need libm.a at all
          math_libs = ['m']
!         if platform in ['darwin', 'beos']:
              math_libs = []
  
--- 260,264 ----
          # Check for MacOS X, which doesn't need libm.a at all
          math_libs = ['m']
!         if platform in ['darwin', 'beos', 'mac']:
              math_libs = []