Skip to content

Commit

Permalink
Move catkin import back to script (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
garyservin committed Jul 15, 2019
1 parent 96c37e3 commit bf63309
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
12 changes: 0 additions & 12 deletions tailor_image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@
import sys
import subprocess

from catkin.find_in_workspaces import find_in_workspaces


def find_package(package_name: str, filename: str):
package_path = find_in_workspaces(
project=package_name,
path=filename,
first_match_only=True,
)[0]

return package_path


def run_command(cmd, *args, **kwargs):
print(' '.join(cmd), file=sys.stderr)
Expand Down
13 changes: 12 additions & 1 deletion tailor_image/create_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
import click
import yaml

from . import find_package, run_command
from catkin.find_in_workspaces import find_in_workspaces
from . import run_command


def create_image(name: str, distribution: str, apt_repo: str, release_track: str, release_label: str, flavour: str,
Expand Down Expand Up @@ -161,6 +162,16 @@ def update_image_index(release_track, apt_repo, common_config, image_name):
})


def find_package(package_name: str, filename: str):
package_path = find_in_workspaces(
project=package_name,
path=filename,
first_match_only=True,
)[0]

return package_path


def main():
parser = argparse.ArgumentParser(description=create_image.__doc__)
parser.add_argument('--name', type=str, required=True)
Expand Down

0 comments on commit bf63309

Please sign in to comment.