Exemplo n.º 1
0
    def configure(self):
        self.helper('./autogen')

        arch         = self.arch
        installdir   = self.env['INSTALL_DIR']
        prefix       = installdir
        config_file  = P.join(self.workdir, 'config.options')
        write_vw_config(prefix, installdir, arch, config_file)
        fix_install_paths(installdir, arch) # this is needed for Mac for libgeotiff
        super(visionworkbench, self).configure()
Exemplo n.º 2
0
            [globals()[pkg] for pkg in args if not pkg.startswith('_')])
        for pkg in remove_build:
            build.remove(pkg)

    if opt.pretend:
        info('I want to build:\n%s' %
             ' '.join(map(lambda x: x.__name__, build)))
        summary(build_env)
        sys.exit(0)

    if opt.base and not opt.resume:
        print('Untarring base system')
        for base in opt.base:
            run('tar', 'xf', base, '-C', build_env['INSTALL_DIR'],
                '--strip-components', '1')
        fix_install_paths(build_env['INSTALL_DIR'], arch)

    # This must happen after untarring the base system,
    # as perhaps cache will be found there.
    if opt.ccache:

        try:
            ccache_path = findfile('ccache', build_env['PATH'])
        except:
            # If could not find ccache, build it.
            print("\n========== Building: %s ==========" % ccache.__name__)
            Package.build(ccache(build_env.copy_set_default()))
            ccache_path = findfile('ccache', build_env['PATH'])

        new = dict(
            CC=P.join(compiler_dir, build_env['CC']),
Exemplo n.º 3
0
    tarball = P.realpath(args[0])
    installdir = P.realpath(args[1])
    if not P.exists(tarball):
        usage('Invalid tarball %s (does not exist)' % tarball, code)
    if not (P.exists(installdir)):
        os.makedirs(installdir)
    if not (P.isdir(installdir)):
        usage('Invalid installdir %s (not a directory)' % installdir, code)
    logging.basicConfig(level=opt.loglevel)

    if not opt.skip_extraction:
        print('Extracting tarball')
        run('tar', 'xf', tarball, '-C', installdir, '--strip-components', '1')

    arch = get_platform()
    fix_install_paths(installdir, arch)

    # Replace /home/user with $HOME, looks nicer in the output
    vardir = installdir
    r = re.compile('^' + os.environ["HOME"] + '(.*?)$')
    m = r.search(vardir)
    if m:
        vardir = '$HOME' + m.group(1)

    prefix = '$PWD/build'
    config_file = P.join(installdir, 'config.options.vw')
    write_vw_config(prefix, vardir, arch, config_file)

    use_env_flags = False
    prefix = '$PWD/build'
    vw_build = '$HOME/projects/visionworkbench/build'
Exemplo n.º 4
0
        remove_build = [globals()[pkg[1:]] for pkg in args if pkg.startswith('_')]
        # Add the stuff without a minus in front of them
        build.extend( [globals()[pkg] for pkg in args if not pkg.startswith('_')] )
        for pkg in remove_build:
            build.remove( pkg )

    if opt.pretend:
        info('I want to build:\n%s' % ' '.join(map(lambda x: x.__name__, build)))
        summary(build_env)
        sys.exit(0)

    if opt.base and not opt.resume:
        print('Untarring base system')
        for base in opt.base:
            run('tar', 'xf', base, '-C', build_env['INSTALL_DIR'], '--strip-components', '1')
        fix_install_paths(build_env['INSTALL_DIR'], arch)

    # This must happen after untarring the base system,
    # as perhaps cache will be found there.
    if opt.ccache:

        try:
            ccache_path = findfile('ccache', build_env['PATH'])
        except:
            # If could not find ccache, build it.
            print("\n========== Building: %s ==========" % ccache.__name__)
            Package.build(ccache(build_env.copy_set_default()))
            ccache_path = findfile('ccache', build_env['PATH'])

        new = dict(
            CC  = P.join(compiler_dir, build_env['CC']),
    tarball    = P.realpath(args[0])
    installdir = P.realpath(args[1])
    if not P.exists(tarball):
        usage('Invalid tarball %s (does not exist)' % tarball, code)
    if not (P.exists(installdir)):
        os.makedirs(installdir)
    if not (P.isdir(installdir)):
        usage('Invalid installdir %s (not a directory)' % installdir, code)
    logging.basicConfig(level=opt.loglevel)

    if not opt.skip_extraction:
        print('Extracting tarball')
        run('tar', 'xf', tarball, '-C', installdir, '--strip-components', '1')

    arch = get_platform()
    fix_install_paths(installdir, arch)

    # Replace /home/user with $HOME, looks nicer in the output
    vardir = installdir
    r = re.compile('^' + os.environ["HOME"] + '(.*?)$')
    m = r.search(vardir)
    if m:
        vardir = '$HOME' + m.group(1)
        
    prefix       = '$PWD/build'
    config_file  = P.join(installdir, 'config.options.vw')
    write_vw_config(prefix, vardir, arch, config_file)

    use_env_flags = False
    prefix       = '$PWD/build'
    vw_build     = '$HOME/projects/visionworkbench/build'