mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-06 10:18:42 +02:00
[core] DirTreeProcessEnv: add internal site-packages first
Ensures that the packages installed in a local virtualenv is taken before the propagation of the global Meshroom environment to avoid version conflicts. Note: We tried to avoid checking files/folders on disk at startup for performance reasons, but here we are forced to use glob as there is no way to know the python version of the plugin in advance.
This commit is contained in:
parent
923be8dc11
commit
d027bf8a7f
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ import sys
|
|||
from enum import Enum
|
||||
from inspect import getfile
|
||||
from pathlib import Path
|
||||
import glob
|
||||
|
||||
from meshroom.common import BaseObject
|
||||
from meshroom.core import desc
|
||||
|
@ -91,7 +92,7 @@ class DirTreeProcessEnv(ProcessEnv):
|
|||
|
||||
self.binPaths: list = [str(Path(folder, "bin"))]
|
||||
self.libPaths: list = [str(Path(folder, "lib")), str(Path(folder, "lib64"))]
|
||||
self.pythonPaths: list = [str(Path(folder))] + self.binPaths
|
||||
self.pythonPaths: list = [str(Path(folder))] + self.binPaths + glob.glob(f'{folder}/lib*/python[0-9].[0-9]*/site-packages', recursive=False)
|
||||
|
||||
def getEnvDict(self) -> dict:
|
||||
env = os.environ.copy()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue