parameters: (package_name, description=None, licenses=None,
                                   maintainer_names=None, author_names=None,
                                   version=None, catkin_deps=None, system_deps=None,
                                   boost_comps=None)
return_statement: return package_temp
docstring: alternative factory method mapping CLI args to argument for
          Package class
  
          :param package_name:
          :param description:
          :param licenses:
          :param maintainer_names:
          :param authors:
          :param version:
          :param catkin_deps:
docstring_summary: alternative factory method mapping CLI args to argument for
          Package class
docstring_tokens: alternative factory method mapping CLI args to argument for Package class
function: def _create_package_template(package_name, description=None, licenses=None,
                                   maintainer_names=None, author_names=None,
                                   version=None, catkin_deps=None, system_deps=None,
                                   boost_comps=None):
          """
          alternative factory method mapping CLI args to argument for
          Package class
  
          :param package_name:
          :param description:
          :param licenses:
          :param maintainer_names:
          :param authors:
          :param version:
          :param catkin_deps:
          """
          # Sort so they are alphebetical
          licenses = list(licenses or ["TODO"])
          licenses.sort()
          if not maintainer_names:
              maintainer_names = [getpass.getuser()]
          maintainer_names = list(maintainer_names or [])
          maintainer_names.sort()
          maintainers = []
          for maintainer_name in maintainer_names:
              maintainers.append(
                  Person(maintainer_name,
                         '%s@todo.todo' % maintainer_name.split()[-1])
              )
          author_names = list(author_names or [])
          author_names.sort()
          authors = []
          for author_name in author_names:
              authors.append(Person(author_name))
          catkin_deps = list(catkin_deps or [])
          catkin_deps.sort()
          pkg_catkin_deps = []
          build_depends = []
          run_depends = []
          buildtool_depends = [Dependency('catkin')]
          for dep in catkin_deps:
              if dep.lower() == 'catkin':
                  catkin_deps.remove(dep)
                  continue
              if dep.lower() == 'genmsg':
                  sys.stderr.write('WARNING: Packages with messages or services should not depend on genmsg, but on message_generation and message_runtime\n')
                  buildtool_depends.append(Dependency('genmsg'))
                  continue
              if dep.lower() == 'message_generation':
                  if not 'message_runtime' in catkin_deps:
                      sys.stderr.write('WARNING: Packages with messages or services should depend on both message_generation and message_runtime\n')
                  build_depends.append(Dependency('message_generation'))
                  continue
              if dep.lower() == 'message_runtime':
                  if not 'message_generation' in catkin_deps:
                      sys.stderr.write('WARNING: Packages with messages or services should depend on both message_generation and message_runtime\n')
                  run_depends.append(Dependency('message_runtime'))
                  continue
              pkg_catkin_deps.append(Dependency(dep))
          for dep in pkg_catkin_deps:
              build_depends.append(dep)
              run_depends.append(dep)
          if boost_comps:
              if not system_deps:
                  system_deps = ['boost']
              elif not 'boost' in system_deps:
                  system_deps.append('boost')
          for dep in system_deps or []:
              if not dep.lower().startswith('python-'):
                  build_depends.append(Dependency(dep))
              run_depends.append(Dependency(dep))
          package_temp = PackageTemplate(
              name=package_name,
              version=version or '0.0.0',
              description=description or 'The %s package' % package_name,
              buildtool_depends=buildtool_depends,
              build_depends=build_depends,
              run_depends=run_depends,
              catkin_deps=catkin_deps,
              system_deps=system_deps,
              boost_comps=boost_comps,
              licenses=licenses,
              authors=authors,
              maintainers=maintainers,
              urls=[])
          return package_temp
function_tokens: def _create_package_template ( package_name , description = None , licenses = None , maintainer_names = None , author_names = None , version = None , catkin_deps = None , system_deps = None , boost_comps = None ) : # Sort so they are alphebetical licenses = list ( licenses or [ "TODO" ] ) licenses . sort ( ) if not maintainer_names : maintainer_names = [ getpass . getuser ( ) ] maintainer_names = list ( maintainer_names or [ ] ) maintainer_names . sort ( ) maintainers = [ ] for maintainer_name in maintainer_names : maintainers . append ( Person ( maintainer_name , '%s@todo.todo' % maintainer_name . split ( ) [ - 1 ] ) ) author_names = list ( author_names or [ ] ) author_names . sort ( ) authors = [ ] for author_name in author_names : authors . append ( Person ( author_name ) ) catkin_deps = list ( catkin_deps or [ ] ) catkin_deps . sort ( ) pkg_catkin_deps = [ ] build_depends = [ ] run_depends = [ ] buildtool_depends = [ Dependency ( 'catkin' ) ] for dep in catkin_deps : if dep . lower ( ) == 'catkin' : catkin_deps . remove ( dep ) continue if dep . lower ( ) == 'genmsg' : sys . stderr . write ( 'WARNING: Packages with messages or services should not depend on genmsg, but on message_generation and message_runtime\n' ) buildtool_depends . append ( Dependency ( 'genmsg' ) ) continue if dep . lower ( ) == 'message_generation' : if not 'message_runtime' in catkin_deps : sys . stderr . write ( 'WARNING: Packages with messages or services should depend on both message_generation and message_runtime\n' ) build_depends . append ( Dependency ( 'message_generation' ) ) continue if dep . lower ( ) == 'message_runtime' : if not 'message_generation' in catkin_deps : sys . stderr . write ( 'WARNING: Packages with messages or services should depend on both message_generation and message_runtime\n' ) run_depends . append ( Dependency ( 'message_runtime' ) ) continue pkg_catkin_deps . append ( Dependency ( dep ) ) for dep in pkg_catkin_deps : build_depends . append ( dep ) run_depends . append ( dep ) if boost_comps : if not system_deps : system_deps = [ 'boost' ] elif not 'boost' in system_deps : system_deps . append ( 'boost' ) for dep in system_deps or [ ] : if not dep . lower ( ) . startswith ( 'python-' ) : build_depends . append ( Dependency ( dep ) ) run_depends . append ( Dependency ( dep ) ) package_temp = PackageTemplate ( name = package_name , version = version or '0.0.0' , description = description or 'The %s package' % package_name , buildtool_depends = buildtool_depends , build_depends = build_depends , run_depends = run_depends , catkin_deps = catkin_deps , system_deps = system_deps , boost_comps = boost_comps , licenses = licenses , authors = authors , maintainers = maintainers , urls = [ ] ) return package_temp