How to use the scons.scons-local-250.SCons.Tool.__init__._LibNameGenerator function in SCons

To help you get started, we’ve selected a few SCons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mapnik / mapnik / scons / scons-local-2.5.0 / SCons / Tool / __init__.py View on Github external
if Verbose:
            print "_LibSonameGenerator: libnode=%r" % libnode.get_path()

        soname = _call_env_subst(env, '$SONAME', **kw2)
        if not soname:
            version = self.get_lib_version(env,**kw2)
            if Verbose:
                print "_LibSonameGenerator: version=%r" % version
            if version:
                prefix = self.get_lib_prefix(env,**kw2)
                suffix = self.get_lib_suffix(env,**kw2)
                soname = self.generate_versioned_lib_info(env, [libnode, version, prefix, suffix], **kw2)

        if not soname:
            # fallback to library name (as returned by appropriate _LibNameGenerator)
            soname = _LibNameGenerator(self.get_libtype())(env, libnode)
            if Verbose:
                print "_LibSonameGenerator: FALLBACK: soname=%r" % soname

        if Verbose:
            print "_LibSonameGenerator: return soname=%r" % soname

        return soname
github SoarGroup / Soar / scons / scons-local-2.5.0 / SCons / Tool / __init__.py View on Github external
def __init__(self, libtype):
        super(_LibNameGenerator, self).__init__(libtype, 'Name')
github SoarGroup / Soar / scons / scons-local-2.5.0 / SCons / Tool / __init__.py View on Github external
if Verbose:
            print "_LibSonameGenerator: libnode=%r" % libnode.get_path()

        soname = _call_env_subst(env, '$SONAME', **kw2)
        if not soname:
            version = self.get_lib_version(env,**kw2)
            if Verbose:
                print "_LibSonameGenerator: version=%r" % version
            if version:
                prefix = self.get_lib_prefix(env,**kw2)
                suffix = self.get_lib_suffix(env,**kw2)
                soname = self.generate_versioned_lib_info(env, [libnode, version, prefix, suffix], **kw2)

        if not soname:
            # fallback to library name (as returned by appropriate _LibNameGenerator)
            soname = _LibNameGenerator(self.get_libtype())(env, libnode)
            if Verbose:
                print "_LibSonameGenerator: FALLBACK: soname=%r" % soname

        if Verbose:
            print "_LibSonameGenerator: return soname=%r" % soname

        return soname
github mapnik / mapnik / scons / scons-local-2.5.0 / SCons / Tool / __init__.py View on Github external
def __init__(self, libtype):
        super(_LibNameGenerator, self).__init__(libtype, 'Name')
github mapnik / mapnik / scons / scons-local-2.5.0 / SCons / Tool / __init__.py View on Github external
name = None
        if version:
            prefix = self.get_lib_prefix(env,**kw2)
            suffix = self.get_lib_suffix(env,**kw2)
            name = self.generate_versioned_lib_info(env, [libnode, version, prefix, suffix], **kw2)

        if not name:
            name = os.path.basename(libnode.get_path())

        if Verbose:
            print '_LibNameGenerator: return name=%r' % name

        return name

ShLibNameGenerator =  _LibNameGenerator('ShLib')
LdModNameGenerator =  _LibNameGenerator('LdMod')
ImpLibNameGenerator = _LibNameGenerator('ImpLib')

class _LibSonameGenerator(_LibInfoGeneratorBase):
    """Library soname generator. Returns library soname (e.g. libfoo.so.0) for 
    a given node (e.g. /foo/bar/libfoo.so.0.1.2)"""
    def __init__(self, libtype):
        super(_LibSonameGenerator, self).__init__(libtype, 'Soname')

    def __call__(self, env, libnode, **kw):
        """Returns a SONAME based on a shared library's node path"""
        Verbose = False

        if libnode and 'target' not in kw:
            kw2 = kw.copy()
            kw2['target'] = libnode
        else:
github SoarGroup / Soar / scons / scons-local-2.5.0 / SCons / Tool / __init__.py View on Github external
name = None
        if version:
            prefix = self.get_lib_prefix(env,**kw2)
            suffix = self.get_lib_suffix(env,**kw2)
            name = self.generate_versioned_lib_info(env, [libnode, version, prefix, suffix], **kw2)

        if not name:
            name = os.path.basename(libnode.get_path())

        if Verbose:
            print '_LibNameGenerator: return name=%r' % name

        return name

ShLibNameGenerator =  _LibNameGenerator('ShLib')
LdModNameGenerator =  _LibNameGenerator('LdMod')
ImpLibNameGenerator = _LibNameGenerator('ImpLib')

class _LibSonameGenerator(_LibInfoGeneratorBase):
    """Library soname generator. Returns library soname (e.g. libfoo.so.0) for 
    a given node (e.g. /foo/bar/libfoo.so.0.1.2)"""
    def __init__(self, libtype):
        super(_LibSonameGenerator, self).__init__(libtype, 'Soname')

    def __call__(self, env, libnode, **kw):
        """Returns a SONAME based on a shared library's node path"""
        Verbose = False

        if libnode and 'target' not in kw:
            kw2 = kw.copy()
            kw2['target'] = libnode
        else:
github mapnik / mapnik / scons / scons-local-2.5.0 / SCons / Tool / __init__.py View on Github external
name = None
        if version:
            prefix = self.get_lib_prefix(env,**kw2)
            suffix = self.get_lib_suffix(env,**kw2)
            name = self.generate_versioned_lib_info(env, [libnode, version, prefix, suffix], **kw2)

        if not name:
            name = os.path.basename(libnode.get_path())

        if Verbose:
            print '_LibNameGenerator: return name=%r' % name

        return name

ShLibNameGenerator =  _LibNameGenerator('ShLib')
LdModNameGenerator =  _LibNameGenerator('LdMod')
ImpLibNameGenerator = _LibNameGenerator('ImpLib')

class _LibSonameGenerator(_LibInfoGeneratorBase):
    """Library soname generator. Returns library soname (e.g. libfoo.so.0) for 
    a given node (e.g. /foo/bar/libfoo.so.0.1.2)"""
    def __init__(self, libtype):
        super(_LibSonameGenerator, self).__init__(libtype, 'Soname')

    def __call__(self, env, libnode, **kw):
        """Returns a SONAME based on a shared library's node path"""
        Verbose = False

        if libnode and 'target' not in kw:
            kw2 = kw.copy()
            kw2['target'] = libnode
github mapnik / mapnik / scons / scons-local-2.5.0 / SCons / Tool / __init__.py View on Github external
if version:
            prefix = self.get_lib_prefix(env,**kw2)
            suffix = self.get_lib_suffix(env,**kw2)
            name = self.generate_versioned_lib_info(env, [libnode, version, prefix, suffix], **kw2)

        if not name:
            name = os.path.basename(libnode.get_path())

        if Verbose:
            print '_LibNameGenerator: return name=%r' % name

        return name

ShLibNameGenerator =  _LibNameGenerator('ShLib')
LdModNameGenerator =  _LibNameGenerator('LdMod')
ImpLibNameGenerator = _LibNameGenerator('ImpLib')

class _LibSonameGenerator(_LibInfoGeneratorBase):
    """Library soname generator. Returns library soname (e.g. libfoo.so.0) for 
    a given node (e.g. /foo/bar/libfoo.so.0.1.2)"""
    def __init__(self, libtype):
        super(_LibSonameGenerator, self).__init__(libtype, 'Soname')

    def __call__(self, env, libnode, **kw):
        """Returns a SONAME based on a shared library's node path"""
        Verbose = False

        if libnode and 'target' not in kw:
            kw2 = kw.copy()
            kw2['target'] = libnode
        else:
            kw2 = kw