Skip to content

Commit a291345

Browse files
committed
ignore source_files entry from entry_point fn
- hard set it to use the __file__ attribute instead of relying on function to insert something meaningful.
1 parent b8ee953 commit a291345

File tree

1 file changed

+16
-0
lines changed
  • src/py-opentimelineio/opentimelineio/plugins

1 file changed

+16
-0
lines changed

src/py-opentimelineio/opentimelineio/plugins/manifest.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,21 @@ def load_manifest():
266266
plugin_entry_point = plugin.load()
267267
try:
268268
plugin_manifest = plugin_entry_point.plugin_manifest()
269+
270+
# this ignores what the plugin_manifest() function might
271+
# put into source_files in favor of using the path to the
272+
# python package as the unique identifier
273+
274+
manifest_path = os.path.abspath(
275+
plugin_entry_point.__file__
276+
)
277+
278+
if manifest_path in result.source_files:
279+
continue
280+
281+
plugin_manifest.source_files = [manifest_path]
282+
plugin_manifest._update_plugin_source(manifest_path)
283+
269284
except AttributeError:
270285
if not pkg_resources.resource_exists(
271286
plugin.module_name,
@@ -291,6 +306,7 @@ def load_manifest():
291306
manifest_stream.read().decode('utf-8')
292307
)
293308
manifest_stream.close()
309+
294310
plugin_manifest._update_plugin_source(filepath)
295311
plugin_manifest.source_files.append(filepath)
296312

0 commit comments

Comments
 (0)