Return the soname of a library.
17385
def getSoname(filename):
    
    cmd = ["objdump", "-p", "-j", ".dynamic", filename]
    m = re.search(r'\s+SONAME\s+([^\s]+)', compat.exec_command(*cmd))
    if m:
        return m.group(1)
873599
def name(self, name=None):
        """"""

        if name is None:
            return self._name
        else:
            if not isinstance(name, str) and name is not None:
                raise TypeError("name must be str, not '%s'" % str(name))
            self._name = name
383055
def get_sonos_favorites(self, *args, **kwargs):
        
        args = tuple(['sonos_favorites'] + list(args))
        return self.get_music_library_information(*args, **kwargs)
37709
def get_lib_name(self):
        
        # We import in here to make sure the the setup_requires are already installed
        import toml

        cfg = toml.load(self.path)
        name = cfg.get("lib", {}).get("name")
        if name is None:
            name = cfg.get("package", {}).get("name")
        if name is None:
            raise Exception(
                "Can not parse library name from Cargo.toml. "
                "Cargo.toml missing value for 'name' key "
                "in both the [package] section and the [lib] section"
            )
        name = re.sub(r"[./\\-]", "_", name)
        return name
1224055
def name(self) -> str:
        """"""
        if self.is_platform:
            if self._data["publicCode"]:
                return self._data['name'] + " Platform " + \
                       self._data["publicCode"]
            else:
                return self._data['name'] + " Platform " + \
                       self.place_id.split(':')[-1]
        else:
            return self._data['name']
336378
def _load_lib():
    """"""
    lib_path = find_lib_path()
    if len(lib_path) == 0:
        return None
    lib = ctypes.cdll.LoadLibrary(lib_path[0])
    lib.LGBM_GetLastError.restype = ctypes.c_char_p
    return lib
1324593
def name(self):
    """"""
    if self._name is None:
      location = getattr(self.path_spec, 'location', None)
      if location is not None:
        self._name = self._file_system.BasenamePath(location)
      else:
        volume_index = apfs_helper.APFSContainerPathSpecGetVolumeIndex(
            self.path_spec)
        if volume_index is not None:
          self._name = 'apfs{0:d}'.format(volume_index + 1)
        else:
          self._name = ''
    return self._name
1287723
def _libname(self):
        """"""
        prefix = 'lib'
        suffix = '.so'
        if platform.system() == 'Darwin':
            suffix = '.dylib'
        if platform.system() == 'Windows':
            prefix = ''
            suffix = '.dll'
        return prefix + self.engine + suffix
597985
def _collection_names_result(self, callback, results, error=None):
        """"""
        names = [r['name'] for r in results if r['name'].count('.') == 1]
        assert error == None, repr(error)
        strip = len(self._pool._dbname) + 1
        callback([name[strip:] for name in names])
1194665
def c_loadlib(self):
        """"""
        name = self._c_base_var()
        kernel32 = 'windll->kernel32.'
        if self.name == 'kernel32':
            loadlib = '{} = get_kernel32_base();\n'.format(
                'kernel32' if self.opts.no_structs
                else kernel32 + self.opts.base
            )
        else:
            loadlib = '{} = {}LoadLibraryA({}{});\n'.format(
                name,
                '' if self.opts.no_structs else kernel32,
                self.opts.prefix, self.name
            )
        return loadlib + self._c_null_check(name)
851506
def nametonum(name):
    
    code = colorcodes.get(name)
    if code is None:
        raise ValueError("%s is not a valid color name." % name)
    else:
        return code
218419
def get_cname(name=None, canonical=None, return_fields=None, **api_opts):
    '''
    
    '''
    infoblox = _get_infoblox(**api_opts)
    o = infoblox.get_cname(name=name, canonical=canonical, return_fields=return_fields)
    return o
841787
def get_sonos_playlists(self, *args, **kwargs):
        
        args = tuple(['sonos_playlists'] + list(args))
        return self.music_library.get_music_library_information(*args,
                                                                **kwargs)
832443
private static String determineMacLibrary(final String library) {
    String resourceName;
    String platform = "darwin";
    String fileExtension = "dylib";
    resourceName = "/" + platform + "/" + library + "." + fileExtension;
    return resourceName;
  }
151812
def sonTraceRootPath():
    
    import sonLib.bioio
    i = os.path.abspath(sonLib.bioio.__file__)
    return os.path.split(os.path.split(os.path.split(i)[0])[0])[0]
1203202
def _getPFilename(self,native,prompt):
        
        return self.get(native=native,prompt=prompt)
94110
def filename(out_dir, name, undefine=False):
    """"""
    if undefine:
        prefix = 'undef_'
    else:
        prefix = ''
    return os.path.join(out_dir, '{0}{1}.hpp'.format(prefix, name.lower()))