NLeSC / root-conda-recipes

Conda recipes for building ROOT 5 and ROOT 6 binaries, root_numpy, rootpy, root_pandas, with both Python 2 and Python 3 support.
29 stars 18 forks source link

CONDA_ENV_PATH #9

Closed arogozhnikov closed 8 years ago

arogozhnikov commented 8 years ago

Hi Daniela,

as you probably know the CONDA_ENV_PATH may not be set by conda in some cases.

See e.g. fix by @ndawe in rootpy to overcome this: https://github.com/rootpy/rootpy/pull/696/files

It's not completely reproducible, since on travis my code is ok, but when I do the same during docker building in ubuntu:14.04, I don't have this variable:

/root/miniconda/envs/rep_py2/etc/conda/activate.d/activateROOT.sh: line 3: /bin/thisroot.sh: No such file or directory

Moreover, it's hard to guess from conda repository whether they plan to support it or not (e.g. ENV_BIN_DIR is not available now, maybe the will delete this).

So, my hackaround is:

source $(which thisroot.sh)

Maybe you find it ok to use in activateROOT.sh

remenska commented 8 years ago

Hi Alex,

Good point, I noticed that lately too, with Conda. But I wasn't really clear which environment variable is suitable for this, they keep changing/removing them.

Thanks for the idea. Will make the changes (or if you want, feel free to make a pull request?) May take a while to rebuild the binaries though.

arogozhnikov commented 8 years ago

Hi again Daniela,

I see you already updated everything (thank you very much!). As I'm testing it now, it seems that root 5* + python 3.4 on linux does not have label 'main', but only 'dev'.

Could you fix this please?

arogozhnikov commented 8 years ago

Tests pass now - thanks, Daniela! You're amazing :)

remenska commented 8 years ago

Hi Alex, Are you sure things are good enough?

$ source activate testenv
prepending /home/daniela/anaconda/envs/testenv/bin to PATH
bash: /bin/thisroot.sh: No such file or directory
Activate: ROOT has been sourced. Environment settings are ready. 
ROOTSYS=/home/daniela/anaconda/envs/testenv

I am waiting for the CI to rebuild the binaries since I forgot to comment out the source ${CONDA_ENV_PATH}/bin/thisroot.sh part, but there are some problems at the moment with our Docker container used for building them. That's why I didn't ping you yet.

arogozhnikov commented 8 years ago

No, I'm still keeping that hack with manually setting env path, so it works...

Please ping when it's ready for testing.

remenska commented 8 years ago

Ping, new binaries are ready, the Travis tests pass without the workaround.

arogozhnikov commented 8 years ago

Ping, new binaries are ready, the Travis tests pass without the workaround.

Thanks! I've tested and it works without hacks for me too.