def _apply_embedding_fix(self, kwds):
        # must include an argument like "-lpython2.7" for the compiler
        def ensure(key, value):
            lst = kwds.setdefault(key, [])
            if value not in lst:
                lst.append(value)
        #
        if '__pypy__' in sys.builtin_module_names:
            if sys.platform == "win32":
                # we need 'libpypy-c.lib'.  Right now, distributions of
                # pypy contain it as 'include/python27.lib'.  You need
                # to manually copy it back to 'libpypy-c.lib'.  XXX Will
                # be fixed in the next pypy release.
                pythonlib = "libpypy-c"
                if hasattr(sys, 'prefix'):
                    ensure('library_dirs', sys.prefix)
            else:
                # we need 'libpypy-c.{so,dylib}', which should be by
                # default located in 'sys.prefix/bin'
                pythonlib = "pypy-c"
                if hasattr(sys, 'prefix'):
                    import os
                    ensure('library_dirs', os.path.join(sys.prefix, 'bin'))
        else:
            if sys.platform == "win32":
                template = "python%d%d"
                if hasattr(sys, 'gettotalrefcount'):
                    template += '_d'
            else:
                try:
                    import sysconfig
                except __HOLE__:    # 2.6
                    from distutils import sysconfig
                template = "python%d.%d"
                if sysconfig.get_config_var('DEBUG_EXT'):
                    template += sysconfig.get_config_var('DEBUG_EXT')
            pythonlib = (template %
                    (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
            if hasattr(sys, 'abiflags'):
                pythonlib += sys.abiflags
        ensure('libraries', pythonlib)
        if sys.platform == "win32":
            ensure('extra_link_args', '/MANIFEST')
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/cffi-1.5.2/cffi/api.py/FFI._apply_embedding_fix