-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare the codebase for hooking it up as a rez plugin
Signed-off-by: Jean-Christophe Morin <[email protected]>
- Loading branch information
1 parent
e039ce0
commit 56d7ae0
Showing
3 changed files
with
75 additions
and
15 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,35 @@ | ||
# SPDX-FileCopyrightText: 2022 Contributors to the rez project | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
"""rez-pip2""" | ||
|
||
import argparse | ||
|
||
import rez.command | ||
|
||
|
||
command_behavior = { | ||
"hidden": False, # optional: bool | ||
"arg_mode": "grouped", # optional: None, "passthrough", "grouped" | ||
} | ||
|
||
|
||
def setup_parser(parser: argparse.ArgumentParser, completions=False): | ||
import rez_pip.cli | ||
|
||
rez_pip.cli._setupParser(parser, fromRez=True) | ||
|
||
|
||
def command(opts, parser=None, extra_arg_groups=None) -> int: | ||
import rez_pip.cli | ||
|
||
return rez_pip.cli.run(args=opts, pipArgs=extra_arg_groups) | ||
|
||
|
||
class RezPip(rez.command.Command): | ||
"""asd""" | ||
|
||
|
||
def register_plugin(): | ||
return RezPip |
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