- Files adapted from other projects carry both licences: StrongPixelSet.cpp,
SpotExtractorGPU.cu and the four GEMMI-derived structure_refinement files
"GPL-3.0-only AND MPL-2.0"; FFBIDXIndexerCPU.cpp, LMSolver.{h,cpp} and
xds-plugin/plugin.* "GPL-3.0-only AND BSD-3-Clause"; fpga/hls/parallel_stream.h
"CERN-OHL-S-2.0 AND Apache-2.0"; fpga/hls/icmp.cpp and ip_header_checksum.h
(HPCN UAM, with PSI modifications) "CERN-OHL-S-2.0 AND BSD-3-Clause".
- writer/H5FDpoison_sec2.{c,h} and tests/enospc_shim.c: "OR HDF5" is not an
SPDX id; now "OR LicenseRef-HDF5", with the text named (licenses/hdf5.txt).
The poison driver wraps the stock sec2 driver rather than copying it (only
the H5FD_class_t initialiser layout matches H5FDsec2.c), so the files stay
dual-licensed (OR), not derived (AND).
- 151 first-party files without a tag (CMake, shell, Python, frontend, docs
JS, a few C++) get one: GPL-3.0-only, CERN-OHL-S-2.0 for fpga/, fpga/hls/
and fpga/scripts/, with the copyright line of the neighbouring files and the
year the file was added. Generated and vendored code is not touched;
fpga/pcie_driver/postinstall.sh and preuninstall.sh are left untagged, as
they say they are taken from a blog post.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UqXYdJDrM65gxsCn2PrbfK
50 lines
1.5 KiB
Bash
Executable File
50 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
# SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
set -euo pipefail
|
|
|
|
# Build the Sphinx HTML documentation.
|
|
#
|
|
# Usage: make_doc.sh [output_dir]
|
|
# output_dir where the rendered HTML is written (default: ./public).
|
|
# Relative paths are resolved against the caller's working
|
|
# directory, so the frontend build can point this at frontend/dist/docs.
|
|
#
|
|
# The Python interpreter can be overridden with $PYTHON. Otherwise the newest
|
|
# available python3.x is used (the bare "python3" is often too old).
|
|
|
|
OUT="${1:-public}"
|
|
|
|
if [ -z "${PYTHON:-}" ]; then
|
|
for candidate in python3.13 python3.12 python3.11 python3; do
|
|
if command -v "$candidate" >/dev/null 2>&1; then
|
|
PYTHON="$candidate"
|
|
break
|
|
fi
|
|
done
|
|
fi
|
|
if [ -z "${PYTHON:-}" ]; then
|
|
echo "No python3 interpreter found" >&2
|
|
exit 1
|
|
fi
|
|
echo "Using $PYTHON ($("$PYTHON" --version 2>&1))"
|
|
|
|
# Resolve the output directory to an absolute path before we change directories.
|
|
mkdir -p "$OUT"
|
|
OUT="$(cd "$OUT" && pwd)"
|
|
|
|
# Run from the repository root regardless of where the script was invoked from.
|
|
cd "$(dirname "$0")"
|
|
|
|
# Remove the throw-away venv however we leave, so a failed pip/sphinx run does not litter the
|
|
# working tree (set -e would otherwise skip the cleanup below).
|
|
trap 'rm -rf tmp_venv/' EXIT
|
|
|
|
"$PYTHON" -m venv tmp_venv/
|
|
source tmp_venv/bin/activate
|
|
|
|
pip install -r docs/requirements.txt
|
|
|
|
sphinx-build -b html docs "$OUT"
|