Exemple #1
0
def parse_package(path):
    if not package_exists_at(path):
        return None
    setuppy = os.path.join(path, 'setup.py')
    kwargs = get_setup_arguments(setuppy)
    data = extract_data(**kwargs)
    pkg = Package(filename=setuppy, **data)
    pkg.exports = [Export('build_type', content='ament_python')]
    return pkg
Exemple #2
0
def parse_package(path):
    if not package_exists_at(path):
        return None
    setuppy = os.path.join(path, 'setup.py')
    kwargs = get_setup_arguments(setuppy)
    data = extract_data(**kwargs)
    pkg = Package(filename=setuppy, **data)
    pkg.exports = [Export('build_type', content='ament_python')]
    return pkg
Exemple #3
0
 def _update_context_with_setup_arguments(self, context):
     if 'setup.py' in context:
         return
     # check setup.py file for data files and packages
     args = get_setup_arguments(os.path.join(context.source_space, 'setup.py'))
     data_files = get_data_files_mapping(args.get('data_files', []))
     context['setup.py'] = {
         'data_files': data_files,
         'packages': args['packages'],
         'py_modules': args.get('py_modules'),
     }
Exemple #4
0
 def _update_context_with_setup_arguments(self, context):
     if 'setup.py' in context:
         return
     # check setup.py file for data files and packages
     args = get_setup_arguments(
         os.path.join(context.source_space, 'setup.py'))
     data_files = get_data_files_mapping(args.get('data_files', []))
     context['setup.py'] = {
         'data_files': data_files,
         'packages': args['packages'],
         'py_modules': args.get('py_modules'),
     }