Changeset 122

Show
Ignore:
Timestamp:
Thu Sep 22 17:23:39 2005
Author:
williamcaban
Message:

Initial/temporary distutils utilization on Make.py

Files:

Legend:

Unmodified
Added
Removed
Modified
  • trunk/source/linux/Make.py

    r46 r122  
    35 35 import pprint  
    36 36  
      37  
      38 # NOTE: This is an temporary incomplete fix. Distutils should be used to get all the values  
      39 # of all these variable to make it more portable.  
      40 # (William Caban will work on completing this during the next few days)  
      41 try:  
      42         import distutils.sysconfig  
      43 except:  
      44         print "ERROR: distutils required"  
      45         sys.exit(1)  
      46  
      47  
      48  
    37 49 def main():  
    38 50     dirnm = os.path.dirname(sys.argv[0])  
     
    88 100         if cygwin:  
    89 101             binlib = os.path.join('/lib', 'python%s' % sys.version[:3], 'config')  
    90           else:  
    91               binlib = os.path.join(exec_prefix,  
    92                                 'lib', 'python%s' % sys.version[:3], 'config')  
    93           incldir = os.path.join(prefix, 'include', 'python%s' % sys.version[:3])  
    94           config_h_dir = os.path.join(exec_prefix, 'include',  
    95                                       'python%s' % sys.version[:3])  
    96           makefile_in = os.path.join(binlib, 'Makefile')  
      102         else:  
      103             binlib = os.path.join (distutils.sysconfig.get_python_lib(True, True, exec_prefix), 'config')  
      104         # TODO: Is it possible to have more than one path returned? if so fix "includes" list  
      105         incldir =  distutils.sysconfig.get_config_vars('INCLUDEDIR')[0]  
      106         config_h_dir =  os.path.join (distutils.sysconfig.get_python_inc(True,exec_prefix))  
      107         makefile_in = distutils.sysconfig.get_makefile_filename()  
    97 108  
    98 109     # salt config.dat with the exe type