File tree Expand file tree Collapse file tree
corems/mass_spectra/input Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414import site
1515from pathlib import Path
1616import datetime
17+ import importlib .util
18+ import os
1719
1820import clr
1921import pandas as pd
3133from corems .encapsulation .factory .parameters import LCMSParameters , default_parameters
3234from corems .mass_spectra .input .parserbase import SpectraParserInterface
3335
34- # do not change the order from the imports statements and reference ThermoFisher below
35- sys . path . append ( site . getsitepackages ()[ 0 ] + "/ext_lib/dotnet/ " )
36- sys .path .append (" ext_lib/dotnet/" )
36+ # Add the path of the Thermo .NET libraries to the system path
37+ spec = importlib . util . find_spec ( "corems " )
38+ sys .path .append (str ( Path ( os . path . dirname ( spec . origin )). parent ) + "/ ext_lib/dotnet/" )
3739
3840clr .AddReference ("ThermoFisher.CommonCore.RawFileReader" )
3941clr .AddReference ("ThermoFisher.CommonCore.Data" )
You can’t perform that action at this time.
0 commit comments