forked from bjodah/chempy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostBuild
executable file
·17 lines (16 loc) · 907 Bytes
/
postBuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
# See: http://mybinder.readthedocs.io/en/latest/using.html#postbuild
python setup.py develop --user
# repo2docker does not use a conda environment, hence $CONDA_PREFIX is not
# set by default. Until there is a standard way of setting compiler variables
# we add the hardcoded conda-root path to the relevant environment variables:
PY_LIB_ROOT=$(compgen -G '/srv/conda/lib/python3.*')
cat <<EOF >>$PY_LIB_ROOT/site-packages/usercustomize.py
import os
ld_lib_pth = os.environ.get('LD_LIBRARY_PATH', '')
lib_pth = os.environ.get('LIBRARY_PATH', '')
cpp_inc_pth = os.environ.get('CPLUS_INCLUDE_PATH', '')
os.environ['LD_LIBRARY_PATH'] = '/srv/conda/lib' + ((':%s' % ld_lib_pth) if ld_lib_pth else '')
os.environ['LIBRARY_PATH'] = '/srv/conda/lib' + ((':%s' % lib_pth) if lib_pth else '')
os.environ['CPLUS_INCLUDE_PATH'] = '/srv/conda/include' + ((':%s' % cpp_inc_pth) if cpp_inc_pth else '')
EOF