in cmake/scripts/parse_cargo_packages.py [0:0]
def pkg_path_2_category(pkg_path):
"""
Take pkg path and return its category.
Return services/examples/tests/cli/dcap depends on the beginning of pkg_path.
(lib not used by this function)
"""
if pkg_path.startswith('services/'):
return 'services'
elif pkg_path.startswith('examples/'):
return 'examples'
elif pkg_path.startswith('tests/'):
return 'tests'
elif pkg_path.startswith('tools/'):
return 'tools'
elif pkg_path == 'cli':
return 'cli'
elif pkg_path == 'dcap':
return 'dcap'
else:
sys.stderr.write(
'[Error]: Unknown category for package_path {}\n'.format(pkg_path))
sys.exit(-1)