ESGF / esgf-installer

ESGF P2P Node Installer
https://esgf.llnl.gov/
Other
21 stars 21 forks source link

Install the installer scripts into the Conda environment #684

Open nathanlcarlson opened 5 years ago

nathanlcarlson commented 5 years ago

The goal is to be able to have the installer control scripts in the path when the installer's conda environment is activated.

@William-Hill @sashakames This is going to be a little more complicated than initially thought as nearly every module has this line declaring a global config variable:

with open(os.path.join(os.path.dirname(__file__), 'esg_config.yaml'), 'r') as config_file:
    config = yaml.load(config_file)

When the installer is "installed" into the environment (via python setup.py install) the variable __file__ is not what is expected to be and the esg_config.yml will not be found.

Additionally, this is not the only use of __file__ so this is likely not the only error case.