[Python-checkins] CVS: distutils/distutils sysconfig.py,1.16,1.17

Greg Ward python-dev@python.org
Tue, 18 Apr 2000 22:22:09 -0400 (EDT)


Update of /projects/cvsroot/distutils/distutils
In directory kaluha:/tmp/cvs-serv6000

Modified Files:
	sysconfig.py 
Log Message:
Added kludge to deal with the "./ld_so_aix" problem: force all strings
in the Makefile that start with "./" to be absolute paths (with the 
implied root being the directory where the Makefile itself was found).

Index: sysconfig.py
===================================================================
RCS file: /projects/cvsroot/distutils/distutils/sysconfig.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** sysconfig.py	2000/04/19 02:18:09	1.16
--- sysconfig.py	2000/04/19 02:22:07	1.17
***************
*** 7,11 ****
  """
  
! __version__ = "$Revision: 1.16 $"
  
  import os
--- 7,11 ----
  """
  
! __version__ = "$Revision: 1.17 $"
  
  import os
***************
*** 205,208 ****
--- 205,223 ----
                  # bogus variable reference; just drop it since we can't deal
                  del notdone[name]
+ 
+     # "Fix" all pathnames in the Makefile that are explicitly relative,
+     # ie. that start with "./".  This is a kludge to fix the "./ld_so_aix"
+     # problem, the nature of which is that Python's installed Makefile
+     # refers to "./ld_so_aix", but when we are building extensions we are
+     # far from the directory where Python's Makefile (and ld_so_aix, for
+     # that matter) is installed.  Unfortunately, there are several other
+     # relative pathnames in the Makefile, and this fix doesn't fix them,
+     # because the layout of Python's source tree -- which is what the
+     # Makefile refers to -- is not fully preserved in the Python
+     # installation.  Grumble.
+     from os.path import normpath, join, dirname
+     for (name, value) in done.items():
+         if value[0:2] == "./":
+             done[name] = normpath(join(dirname(fp.name), value))
  
      # save the results in the global dictionary