Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bin/ecbundle-create
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def main():
parser.add_argument('--src-dir',
help='Directory containing repositories', default='source')

parser.add_argument('--arch-dir',
help='Directory containing supported architectures', default='arch')

parser.add_argument('--update',
help='Update local checkout with remote changes',
action='store_true')
Expand Down
12 changes: 11 additions & 1 deletion ecbundle/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ def dryrun(self):
def src_dir(self):
return fullpath(self.get("src_dir", "source"))

def arch_dir(self):
return self.get("arch_dir", "arch")

def bundle(self):
bundle_path = fullpath(self.get("bundle", None))
if bundle_path:
Expand Down Expand Up @@ -66,9 +69,16 @@ def create(self):

bundle_yml_file = src_dir + "/bundle.yml"

arch_dir = self.arch_dir()
if os.path.isabs(arch_dir):
symlink_force(arch_dir, src_dir + "/arch")
else:
symlink_force(
os.path.dirname(bundle.file()) + f"/{arch_dir}", src_dir + "/arch"
)

if self.bundle_needs_updating():
symlink_force(bundle.file(), bundle_yml_file)
symlink_force(os.path.dirname(bundle.file()) + "/arch", src_dir + "/arch")

self.create_cmakelists_from_bundle()

Expand Down
4 changes: 4 additions & 0 deletions tests/bundle_create/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def test_create_simple(here, cleanup):
"dry_run": True,
"bundle": "%s" % here,
"src_dir": "%s" % src_dir,
"arch_dir": "%s" % (here / "arch"),
"update": False,
"forced_update": False,
"threads": 1,
Expand Down Expand Up @@ -80,6 +81,7 @@ def test_create_optional_fail(here, cleanup):
"dryrun": True,
"dry_run": True,
"src_dir": "%s" % src_dir,
"arch_dir": "%s" % (here / "arch"),
"update": False,
"forced_update": False,
"threads": 1,
Expand Down Expand Up @@ -117,6 +119,7 @@ def test_create_optional_success(here, cleanup):
"dryrun": True,
"dry_run": True,
"src_dir": "%s" % src_dir,
"arch_dir": "%s" % (here / "arch"),
"update": False,
"forced_update": False,
"threads": 1,
Expand Down Expand Up @@ -158,6 +161,7 @@ def test_create_existing_symlink(here, cleanup, watcher):
"dry_run": True,
"bundle": "%s" % here,
"src_dir": "%s" % src_dir,
"arch_dir": "%s" % (here / "arch"),
"update": False,
"forced_update": False,
"threads": 1,
Expand Down
1 change: 1 addition & 0 deletions tests/bundle_install/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def args(here):
"cmake": None,
"project1.cmake": None,
"arch": None,
"arch_dir": "%s" % (here / "arch"),
"build_type": "BIT",
"bundle": "%s" % here,
}
Expand Down
Loading