Skip to content

Commit

Permalink
Introduce support for plugins (#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf authored Feb 8, 2022
1 parent d7ad9ce commit 61ccf36
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions alibuild_helpers/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def doParseArgs(star):
"%(metavar)s is a comma-separated list."))
build_parser.add_argument("--force-tracked", dest="forceTracked", default=False, action="store_true",
help=("Do not pick up any packages from a local checkout. "))
build_parser.add_argument("--plugin", dest="plugin", default="legacy", help=("Plugin to use to do the actual build. "))
build_parser.add_argument("--disable", dest="disable", default=[], metavar="PACKAGE", action="append",
help="Do not build %(metavar)s and all its (unique) dependencies.")

Expand Down
5 changes: 5 additions & 0 deletions alibuild_helpers/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,11 @@ def downloadTask(p):
),
args.architecture)

if args.plugin != "legacy":
build_plugin = __import__("alibuild_helpers.%s_plugin" % args.plugin, fromlist=[''])
build_plugin.build_plugin(specs, args, buildOrder)
return

while buildOrder:
packageIterations += 1
if packageIterations > 20:
Expand Down
1 change: 1 addition & 0 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ def test_coverDoBuild(self, mock_debug, mock_glob, mock_sys, mock_sync_execute,
noDevel=[],
fetchRepos=False,
forceTracked=False,
plugin="legacy"
)
mock_sys.version_info = sys.version_info

Expand Down

0 comments on commit 61ccf36

Please sign in to comment.