Ignore:
Timestamp:
Mar 21, 2014, 1:39:52 PM (11 years ago)
Author:
dmik
Message:

python: Use Posix directory scheme everywhere on OS/2.

Location:
python/trunk/Lib/distutils
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • python/trunk/Lib/distutils/command/install.py

    r391 r394  
    7171        },
    7272    'os2': {
    73         'purelib': '$base/Lib/site-packages',
    74         'platlib': '$base/Lib/site-packages',
    75         'headers': '$base/Include/$dist_name',
    76         'scripts': '$base/Scripts',
     73        'purelib': '$base/lib/python$py_version_short/site-packages',
     74        'platlib': '$platbase/lib/python$py_version_short/site-packages',
     75        'headers': '$base/include/python$py_version_short/$dist_name',
     76        'scripts': '$base/bin',
    7777        'data'   : '$base',
    7878        },
    79     'os2_home': {
     79    'os2_user': {
    8080        'purelib': '$usersite',
    8181        'platlib': '$usersite',
  • python/trunk/Lib/distutils/sysconfig.py

    r391 r394  
    433433def _init_os2():
    434434    """Initialize the module as appropriate for OS/2"""
    435     g = {}
    436     # load the installed Makefile:
    437     try:
    438         filename = get_makefile_filename()
    439         parse_makefile(filename, g)
    440     except IOError, msg:
    441         my_msg = "invalid Python installation: unable to open %s" % filename
    442         if hasattr(msg, "strerror"):
    443             my_msg = my_msg + " (%s)" % msg.strerror
    444 
    445         raise DistutilsPlatformError(my_msg)
    446 
    447     # load the installed pyconfig.h:
    448     try:
    449         filename = get_config_h_filename()
    450         parse_config_h(file(filename), g)
    451     except IOError, msg:
    452         my_msg = "invalid Python installation: unable to open %s" % filename
    453         if hasattr(msg, "strerror"):
    454             my_msg = my_msg + " (%s)" % msg.strerror
    455 
    456         raise DistutilsPlatformError(my_msg)
    457 
    458     # On AIX, there are wrong paths to the linker scripts in the Makefile
    459     # -- these paths are relative to the Python source, but when installed
    460     # the scripts are in another directory.
    461     if python_build:
    462         g['LDSHARED'] = g['BLDSHARED']
    463 
    464     # OS/2 module
    465 
    466     # set basic install directories
    467     g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1)
    468     g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1)
    469 
    470     # XXX hmmm.. a normal install puts include files here
    471     g['INCLUDEPY'] = get_python_inc(plat_specific=0)
    472 
    473     g['SO'] = '.pyd'
    474     g['EXE'] = ".exe"
    475 
    476     global _config_vars
    477     _config_vars = g
     435    _init_posix()
     436    # set the python module extension to .pyd instead of .dll -
     437    # for compatibility with previous releases
     438    _config_vars['SO'] = '.pyd'
    478439
    479440
  • python/trunk/Lib/distutils/tests/test_install.py

    r391 r394  
    9696        self.addCleanup(cleanup)
    9797
    98         for key in ('nt_user', 'unix_user', 'os2_home'):
     98        for key in ('nt_user', 'unix_user', 'os2_user'):
    9999            self.assertIn(key, INSTALL_SCHEMES)
    100100
Note: See TracChangeset for help on using the changeset viewer.