Skip to content

Commit

Permalink
implement live suite (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlatwe committed Dec 16, 2020
1 parent 6d52968 commit ad6505e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 22 deletions.
Empty file.
4 changes: 2 additions & 2 deletions sweet/_rezapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class SweetSuite(Suite):

def __init__(self, live=False):
def __init__(self, live=True):
super(SweetSuite, self).__init__()
self.description = ""
self._is_live = live
Expand Down Expand Up @@ -123,7 +123,7 @@ def save(self, path, verbose=False):

create_forwarding_script(
filepath,
module=("live_resolve", "sweet"), # rez plugin
module=("build_system", "sweet"), # rez plugin
func_name="_FWD__invoke_suite_tool_alias_in_live",
package_requests=requests,
context_name=context_name,
Expand Down
17 changes: 0 additions & 17 deletions sweet/rezconfig.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@

import os
from rez.plugin_managers import RezPluginType, plugin_manager
ModifyList = globals()["ModifyList"]


plugin_path = ModifyList(append=[
# The path *above* rezplugins/ directory
os.path.dirname(__file__)
])

plugins = {
"live_resolve": {
"sweet": {
},
}
}


class LiveResolvePluginType(RezPluginType):
"""Support for live resolving suite.
"""
type_name = "live_resolve"


plugin_manager.register_plugin_type(LiveResolvePluginType)
File renamed without changes.
3 changes: 3 additions & 0 deletions sweet/rezplugins/build_system/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

from rez.plugin_managers import extend_path
__path__ = extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@

import os
import sys
from rezplugins.build_system import custom
from rez.resolved_context import ResolvedContext


class SweetLiveResolve(object):
pass
class SweetBuildSystem(custom.CustomBuildSystem):

@classmethod
def name(cls):
return "sweet"


def _FWD__invoke_suite_tool_alias_in_live(package_requests,
Expand All @@ -25,4 +29,4 @@ def _FWD__invoke_suite_tool_alias_in_live(package_requests,


def register_plugin():
return SweetLiveResolve
return SweetBuildSystem

0 comments on commit ad6505e

Please sign in to comment.