mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 10:05:57 +01:00
Allow for non-default OPAMROOT locations
This commit is contained in:
parent
032d3e2f7e
commit
ddf798119f
13
configure
vendored
13
configure
vendored
@ -496,15 +496,22 @@ def create_ninja_and_rc(l_installed):
|
|||||||
'export LIBRARY_PATH="${QP_ROOT}"/lib:"${LIBRARY_PATH}"',
|
'export LIBRARY_PATH="${QP_ROOT}"/lib:"${LIBRARY_PATH}"',
|
||||||
'export C_INCLUDE_PATH="${C_INCLUDE_PATH}":"${QP_ROOT}"/include',
|
'export C_INCLUDE_PATH="${C_INCLUDE_PATH}":"${QP_ROOT}"/include',
|
||||||
'',
|
'',
|
||||||
'source ${QP_ROOT}/install/EZFIO/Bash/ezfio.sh', "",
|
'source ${QP_ROOT}/install/EZFIO/Bash/ezfio.sh',
|
||||||
'source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true',
|
|
||||||
'',
|
'',
|
||||||
'# Choose the correct network interface',
|
'# Choose the correct network interface',
|
||||||
'# export QP_NIC=ib0',
|
'# export QP_NIC=ib0',
|
||||||
'# export QP_NIC=eth0',
|
'# export QP_NIC=eth0',
|
||||||
""
|
''
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if os.getenv('OPAMROOT'):
|
||||||
|
opam_root = os.getenv('OPAMROOT')
|
||||||
|
l_rc.append('export OPAMROOT={0}'.format(opam_root))
|
||||||
|
l_rc.append('source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true')
|
||||||
|
else:
|
||||||
|
l_rc.append('source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true')
|
||||||
|
l_rc.append('')
|
||||||
|
|
||||||
path = join(QP_ROOT, "quantum_package.rc")
|
path = join(QP_ROOT, "quantum_package.rc")
|
||||||
with open(path, "w+") as f:
|
with open(path, "w+") as f:
|
||||||
f.write("\n".join(l_rc))
|
f.write("\n".join(l_rc))
|
||||||
|
Loading…
Reference in New Issue
Block a user