mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-13 14:57:22 +02:00
[core] Add ProcessEnv
class in new plugins
module
Add a new module named `plugins` with a `ProcessEnv` class which contains the paths describing the environment needed for the plugin's (node's) process.
This commit is contained in:
parent
99a6dc0671
commit
b56420318d
2 changed files with 17 additions and 4 deletions
|
@ -19,6 +19,7 @@ try:
|
|||
except Exception:
|
||||
pass
|
||||
|
||||
from meshroom.core.plugins import ProcessEnv
|
||||
from meshroom.core.submitter import BaseSubmitter
|
||||
from meshroom.env import EnvVar, meshroomFolder
|
||||
from . import desc
|
||||
|
@ -349,9 +350,7 @@ def loadPluginFolder(folder):
|
|||
logging.info(f"Plugin folder '{folder}' does not contain a 'meshroom' folder.")
|
||||
return
|
||||
|
||||
binFolders = [Path(folder, 'bin')]
|
||||
libFolders = [Path(folder, 'lib'), Path(folder, 'lib64')]
|
||||
pythonPathFolders = [Path(folder)] + binFolders
|
||||
processEnv = ProcessEnv(folder)
|
||||
|
||||
loadAllNodes(folder=mrFolder)
|
||||
loadPipelineTemplates(folder=mrFolder)
|
||||
|
|
14
meshroom/core/plugins.py
Normal file
14
meshroom/core/plugins.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
from pathlib import Path
|
||||
|
||||
from meshroom.common import BaseObject
|
||||
|
||||
class ProcessEnv(BaseObject):
|
||||
"""
|
||||
Describes the environment required by a node's process.
|
||||
"""
|
||||
|
||||
def __init__(self, folder: str):
|
||||
super().__init__()
|
||||
self.binPaths: list = [Path(folder, "bin")]
|
||||
self.libPaths: list = [Path(folder, "lib"), Path(folder, "lib64")]
|
||||
self.pythonPathFolders: list = [Path(folder)] + self.binPaths
|
Loading…
Add table
Add a link
Reference in a new issue