forked from ros2/ros1_bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create package whitelist from package.xml
The prior mechanism to generate an ignore/include list was to use a static file at the workspace root. This doesn't play very well with our build system so instead use package.xml. Any <build_depend> package will now be included in the ros1_bridge build. This is done using a simple python script to parse package.xml which is then called by cmake (stdout of the script is the list). We then feed that list into a modified filter_packages() function that takes a list of include/ignore packages rather than using the static list.
- Loading branch information
Showing
4 changed files
with
42 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import sys | ||
from catkin_pkg.package import parse_package | ||
|
||
def main(argv=sys.argv[1:]): | ||
pkg = parse_package("package.xml") | ||
packages = [] | ||
|
||
for depend in pkg["build_depends"]: | ||
packages.append(depend.name) | ||
|
||
print(';'.join(packages), end='') | ||
|
||
if __name__ == '__main__': | ||
sys.exit(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters