File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -67,15 +67,15 @@ def append_if_valid(dir_):
67
67
for dir_ in config .plugin_path :
68
68
append_if_valid (dir_ )
69
69
# Extend new-style plugins
70
- for dir_ in plugin_manager .sys_module_paths :
70
+ for dir_ in plugin_manager .rezplugins_module_paths :
71
71
append_if_valid (dir_ )
72
72
73
73
return path
74
74
75
75
76
- def uncache_sys_module_paths (instance = None ):
76
+ def uncache_rezplugins_module_paths (instance = None ):
77
77
instance = instance or plugin_manager
78
- cached_property .uncache (instance , "sys_module_paths " )
78
+ cached_property .uncache (instance , "rezplugins_module_paths " )
79
79
80
80
81
81
class RezPluginType (object ):
@@ -296,11 +296,16 @@ def __init__(self):
296
296
self ._plugin_types = {}
297
297
298
298
@cached_property
299
- def sys_module_paths (self ):
299
+ def rezplugins_module_paths (self ):
300
300
paths = []
301
301
for importer , name , ispkg in pkgutil .iter_modules ():
302
- if ispkg :
303
- paths .append (os .path .join (importer .path , name ))
302
+ if not ispkg :
303
+ continue
304
+
305
+ module_path = os .path .join (importer .path , name )
306
+ if os .path .isdir (os .path .join (module_path , "rezplugins" )):
307
+ paths .append (module_path )
308
+
304
309
return paths
305
310
306
311
# -- plugin types
Original file line number Diff line number Diff line change 2
2
test rezplugins manager behaviors
3
3
"""
4
4
from rez .tests .util import TestBase , TempdirMixin , restore_sys_path
5
- from rez .plugin_managers import plugin_manager , uncache_sys_module_paths
5
+ from rez .plugin_managers import plugin_manager , uncache_rezplugins_module_paths
6
6
from rez .package_repository import package_repository_manager
7
7
import sys
8
8
import unittest
@@ -19,7 +19,7 @@ def _reset_plugin_manager(cls):
19
19
package_repository_manager .clear_caches ()
20
20
package_repository_manager .pool .resource_classes .clear ()
21
21
# for resetting new-style plugins
22
- uncache_sys_module_paths ()
22
+ uncache_rezplugins_module_paths ()
23
23
24
24
plugin_types = []
25
25
for singleton in plugin_manager ._plugin_types .values ():
You can’t perform that action at this time.
0 commit comments