Skip to content
Snippets Groups Projects
Commit 37786afb authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Run all Python subprocesses with the same Python

parent 910f9d79
No related branches found
No related tags found
1 merge request!350Simplify how batch jobs find Python tools
......@@ -59,6 +59,6 @@ fi
if [ "${final}" == "FINAL" ]
then
${finalize} $SLURM_JOB_ID
XFEL_CALIBRATE_PYTHON="${python_path}" ${finalize} $SLURM_JOB_ID
fi
killall -9 cal_influx_feeder.sh || true
......@@ -508,7 +508,7 @@ def create_finalize_script(fmt_args, temp_path, job_list):
source /etc/profile.d/modules.sh
module load texlive/2019
echo 'Running finalize script'
python3 -c "from xfel_calibrate.finalize import finalize;
"${XFEL_CALIBRATE_PYTHON}" -c "from xfel_calibrate.finalize import finalize;
finalize(joblist={{joblist}},
finaljob=$1,
run_path='{{run_path}}',
......
......@@ -209,7 +209,7 @@ def make_report(run_path, tmp_path, out_path, project, author, version,
out_path = report_path
try:
check_call(["sphinx-quickstart",
check_call([sys.executable, "-m", "sphinx.quickstart",
"--quiet",
"--project='{}'".format(project),
"--author='{}'".format(author),
......@@ -222,7 +222,7 @@ def make_report(run_path, tmp_path, out_path, project, author, version,
"--no-batchfile", run_path])
except CalledProcessError:
raise Exception("Failed to run sphinx-quickbuild. Is sphinx installed?"
raise Exception("Failed to run sphinx-quickstart. Is sphinx installed?"
"Generated simple index.rst instead")
# quickbuild went well we need to edit the index.rst and conf.py files
......@@ -299,7 +299,7 @@ def make_report(run_path, tmp_path, out_path, project, author, version,
# finally call the make scripts
chdir(run_path)
try:
check_call(["make", "latexpdf"])
check_call(["make", f"SPHINXBUILD={sys.executable} -m sphinx", "latexpdf"])
except CalledProcessError:
print("Failed to make pdf documentation")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment