def fix_lib64(lib_dir, symlink=True):
 if [p for p in distutils.sysconfig.get_config_vars().values() if (isinstance(p, basestring) and ('lib64' in p))]:
  if is_pypy:
   logger.debug('PyPy detected, skipping lib64 symlinking')
   return
  logger.debug('This system uses lib64; symlinking lib64 to lib')
  assert (os.path.basename(lib_dir) == ('python%s' % sys.version[:3])), ('Unexpected python lib dir: %r' % lib_dir)
  lib_parent = os.path.dirname(lib_dir)
  top_level = os.path.dirname(lib_parent)
  lib_dir = os.path.join(top_level, 'lib')
  lib64_link = os.path.join(top_level, 'lib64')
  assert (os.path.basename(lib_parent) == 'lib'), ('Unexpected parent dir: %r' % lib_parent)
  if os.path.lexists(lib64_link):
   return
  if symlink:
   os.symlink('lib', lib64_link)
  else:
   copyfile('lib', lib64_link)

def fix_lib64 ( lib_dir , symlink = True ) : if [ p for p in distutils . sysconfig . get_config_vars ( ) . values ( ) if ( isinstance ( p , basestring ) and ( 'lib64' in p ) ) ] : if is_pypy : logger . debug ( 'PyPy detected, skipping lib64 symlinking' ) return logger . debug ( 'This system uses lib64; symlinking lib64 to lib' ) assert ( os . path . basename ( lib_dir ) == ( 'python%s' % sys . version [ : 3 ] ) ) , ( 'Unexpected python lib dir: %r' % lib_dir ) lib_parent = os . path . dirname ( lib_dir ) top_level = os . path . dirname ( lib_parent ) lib_dir = os . path . join ( top_level , 'lib' ) lib64_link = os . path . join ( top_level , 'lib64' ) assert ( os . path . basename ( lib_parent ) == 'lib' ) , ( 'Unexpected parent dir: %r' % lib_parent ) if os . path . lexists ( lib64_link ) : return if symlink : os . symlink ( 'lib' , lib64_link ) else : copyfile ( 'lib' , lib64_link )
some platforms put things in lib64/pythonx .