Ejemplo n.º 1
0
  def __ask__(self):
    defaults = self.rc.copy()
    for i in EMPTY_RC:
      if not i in defaults:
        defaults[i] = EMPTY_RC[i]
      elif not type(EMPTY_RC[i]) == str:
        for j in EMPTY_RC[i]:
          if not j in defaults[i]:
            defaults[i][j] = EMPTY_RC[i][j]



    console.warn("""You don't seem to have documented your default informations, 
or airstrip has an upgraded version that requires new infos.""")
    console.info("""These infos are stored only in the file %s, which you can edit manually.""" % AIRSTRIP_RC_PATH)

    console.info('First, provide informations about your company (if any - used generally for the author fields and copyright owner informations.)')
    self.rc['company']['name'] = prompt('Your company name (currently: %s)' % defaults['company']['name'], defaults['company']['name'])
    self.rc['company']['mail'] = prompt('Your company mail (currently: %s)' % defaults['company']['mail'], defaults['company']['mail'])
    self.rc['company']['url'] = prompt('Your company website / twitter (currently: %s)' % defaults['company']['url'], defaults['company']['url'])

    console.info('Now, about you - this will be used for the contributors/maintainers fields.')
    self.rc['you']['name'] = prompt('Your name (currently: %s)' % defaults['you']['name'], defaults['you']['name'])
    self.rc['you']['mail'] = prompt('Your mail (currently: %s)' % defaults['you']['mail'], defaults['you']['mail'])
    self.rc['you']['url'] = prompt('Your website / twitter (currently: %s)' % defaults['you']['url'], defaults['you']['url'])
    self.rc['you']['login'] = prompt('Your github name (currently: %s)' % defaults['you']['login'], defaults['you']['login'])

    keys = licenses.Licenses().list()
    self.rc['license'] = prompt('Default license for new projects (among %s)? (currently: %s)' % (keys, defaults['license']), defaults['license'])

    self.rc['git'] = prompt('Default git owner to use for new projects? (currently: %s)' % defaults['git'], defaults['git'])
    self.rc['ln'] = prompt('Default language for projects? (currently: %s)' % defaults['ln'], defaults['ln'])

    self.set('version', API)
Ejemplo n.º 2
0
def configure():
	monade.console.error("Libtool can't be compiled on a filesystem that don't support hard links. So, scratch CIFS/AFP for your build/tmp directory.")
	prompt("Also, libtool MIGHT fail building on the first run (might have been parallel build that broke it - unconfirmed). Press enter now.")
	monade.configure('--with-pic', debug = '')
Ejemplo n.º 3
0
def __find(production, envir, ignoresystem = False):
  # Initialize the environment for the given target
  # env.sethost(puke.Yak.XCC)
  # # Specify our deploy path

  # Currently, packages that are both compiled in a toolchain AND as native dependency override each other when it comes to pc files.
  # The only solution would be to maintain two different PKG_CONFIG...
  # Try pkg-config first
  # XXX This is massively broken when cross-compiling
  # if fs.exists(fs.join(env.native.prefix, 'bin', 'pkg-config')) and production != 'pkg-config':
  #   command = 'pkg-config --modversion %s' % production
  #   try:
  #     console.info(' * Trying to find through pkg-config')
  #     # First try our pkg-config
  #     ret = shell.execute(envir.flush(), command, silent = True)
  #     ret = shell.execute(envir.flush(), 'echo $PKG_CONFIG_PATH/%s.pc' % production)
  #     console.info('  + Found package at %s' % ret.out.strip())
  #     return ret.out.strip()
  #   except Exception as e:
  #     console.info('  - Failed!')
  # else:
  #   console.info(' * You don\'t have pkg-config (yet?)!')

  # Otherwise, try the production name, litterally
  verif = fs.join(envir.prefix, production)
  console.info(' * Trying to find the given filename %s' % verif)
  if fs.exists(verif):
    if verif == production:
      # Should NEVER happen - this is bad every inch
      console.warn('  + Found but... BEWARE! This is a system path and might not be portable (that being said, *you* specified it!): %s' % verif)
    else:
      console.info('  + Found package in: %s' % verif)
    return verif
  else:
    console.info('  - Failed!')
    console.info(' * Trying to find the package as a binary somewhere')
    # Finally, that may be a binary
    # XXX this first because on cross compiling, the path is not set to the local bin
    test = fs.join(envir.prefix, 'bin', production)
    if fs.exists(test):
      console.info('  + Found a binary here: %s' % test)
      return test
    # Dirty windows trick
    test = fs.join(envir.prefix, 'bin', '%s.exe' % production)
    if fs.exists(test):
      console.info('  + Found a binary here: %s' % test)
      return test
    command = 'which %s' % production
    try:
      ret = shell.execute(envir.flush(), command, silent = True)
      if ret.out.startswith(envir.prefix):
        console.info('  + Found a binary here: %s' % ret.out)
      else:
        if ignoresystem:
          return False
        console.error('  + Found a binary on the system (might cause compatibility problems!): %s' % ret.out)
        q = prompt('Do you want to build your own, or use the system package (type "system")?')
        if q != 'system':
          return False
      return ret.out.strip()
    except:
      pass

  console.info('  - Failed!')
  console.warn('Package production not found')
  return False