[Python-checkins] CVS: python/dist/src/Lib/distutils mwerkscompiler.py,1.3,1.4

Jack Jansen jackjansen@users.sourceforge.net
Tue, 19 Jun 2001 14:23:13 -0700


Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv16825/Python/Lib/distutils

Modified Files:
	mwerkscompiler.py 
Log Message:
- _filename_to_abs() didn't cater for .. components in the pathname. Fixed.
- compile() didn't return a (empty) list of objects. Fixed.
- the various _fix_xxx_args() methods weren't called (are they new or did I overlook them?). Fixed.

Index: mwerkscompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/mwerkscompiler.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** mwerkscompiler.py	2001/06/19 19:44:02	1.3
--- mwerkscompiler.py	2001/06/19 21:23:11	1.4
***************
*** 63,70 ****
--- 63,73 ----
                   extra_preargs=None,
                   extra_postargs=None):
+          (output_dir, macros, include_dirs) = \
+             self._fix_compile_args (output_dir, macros, include_dirs)
           self.__sources = sources
           self.__macros = macros
           self.__include_dirs = include_dirs
           # Don't need extra_preargs and extra_postargs for CW
+          return []
           
      def link (self,
***************
*** 81,84 ****
--- 84,92 ----
                extra_postargs=None,
                build_temp=None):
+         # First fixup.
+         (objects, output_dir) = self._fix_object_args (objects, output_dir)
+         (libraries, library_dirs, runtime_library_dirs) = \
+             self._fix_lib_args (libraries, library_dirs, runtime_library_dirs)
+ 
          # First examine a couple of options for things that aren't implemented yet
          if not target_desc in (self.SHARED_LIBRARY, self.SHARED_OBJECT):
***************
*** 201,205 ****
             curdir = os.getcwd()
             filename = os.path.join(curdir, filename)
!         return filename
          
          
--- 209,218 ----
             curdir = os.getcwd()
             filename = os.path.join(curdir, filename)
!         # Finally remove .. components
!         components = string.split(filename, ':')
!         for i in range(1, len(components)):
!            if components[i] == '..':
!               components[i] = ''
!         return string.join(components, ':')