Skip to content

Relicense Sire from GPLv3+ to LGPLv3+ - #509

Open
lohedges wants to merge 21 commits into
develfrom
feature_lgpl
Open

lohedges wants to merge 21 commits into
develfrom
feature_lgpl

Conversation

@lohedges

Copy link
Copy Markdown
Contributor

This PR relicenses Sire under the GNU Lesser General Public License, version 3 or (at your option) any later version. All copyright holders of non-trivial surviving code have agreed to the change in #486, hence this closes #486.

It has two parts: removing the code that forced Sire to be GPL, then the relicense itself.

1. Removing GPL-derived code

  • GSL (GPLv3) removed. SireMaths::Matrix SVD, eigendecomposition and covariance now use Eigen (MPL-2.0). Complex is backed by std::complex<double>, the gamma functions use Boost.Math, and areEqual and the numeric constants are implemented directly. GSL is removed from CMake, pixi.toml and the conda recipe.
  • regress (GPLv3) removed. The polynomial fit and quadrature in SireAnalysis::TIPMF are reimplemented with Eigen (column-pivoted QR) and a plain trapezoidal rule.
  • MDAnalysis-derived bond-order heuristic removed from SireRDKit. The fallback now calls MDAnalysis (>= 2.8.0, LGPL) directly through a Python callback. If MDAnalysis is not installed, determine_bond_orders=False raises an error and a failed determineBondOrders() emits a warning.

Regression tests were written against the GSL/regress builds before each swap: tests/maths/test_matrix_decompositions.py, tests/maths/test_complex.py, tests/maths/test_gamma.py and tests/analysis/test_ti_pmf.py.

Behaviour changes to be aware of:

  • For rank-deficient input, Matrix::svd() now returns fully orthonormal U/V (Eigen), where GSL returned zero columns. kabasch() already handles this case, so alignment results are unaffected.
  • arccsch(z) now uses arcsinh(1/z). The previous GSL-copied documentation gave arcsin(1/z).

2. Relicense

  • LICENSE (and recipes/sire/LICENSE): the LGPLv3 text followed by the GPLv3 text it builds on, with a short note explaining why both are present. Both sections are verbatim from gnu.org.
  • Source headers: all 1,240 full GPL headers and the 2,023 generated wrapper notices are updated, along with the wrapper generator (create_wrappers.py). Headers now refer to the LICENSE file, and the old FSF postal address is replaced by the URL. This commit was made with clang-format skipped so that it contains only the header change.
  • Metadata: setup.py and the generated conda recipe use LGPL-3.0-or-later. Also updated: the PR template, CONTRIBUTING.md, corelib/build/README, download_compile_sire.py, the sire app licence banner (which said GPLv2), OpenMMMD.__license__, and the --help text of the legacy scripts in wrapper/python/scripts.
  • Docs: acknowledgements.rst (licence statement, compatibility notes, a new xdrfile/xtc_seek entry), contributing/index.rst and the changelog.

Third-party code found during the audit:

  • SireIO/third_party/xtc_seek.{c,h} (MDAnalysis) were GPLv2+. Their headers are updated to match upstream, which MDAnalysis has relicensed to LGPLv2.1+.
  • SireMaths/complex.h/.cpp carried doc comments copied from the GSL manual (GFDL with invariant sections). These are rewritten, as are the matching docstrings in wrapper/Maths/Complex.pypp.cpp.
  • Sire.Tools.ap (ascii plotting) had no licence, either in the file or upstream. It is removed, along with the optional ascii plots in analyse_freenrg.
  • SireMaths/linearap.cpp contained a commented-out verbatim copy of Jonker's "freeware" LAP.CPP. It is removed. The live implementation is Sire's own port of the Jonker-Volgenant algorithm and keeps its attribution.
  • The legacy package_sire self-extracting installer (makeself.sh, which is GPLv2, and the rest of corelib/share/build) is removed, together with its CMake install rule. Nothing else uses it.

Everything else that is vendored is permissive: xdrfile and MersenneTwister (BSD), sse/avx/neon_mathfun and md5 (zlib-style), sse2neon (MIT) and eig3 (public domain). The Qt headers in wrapper/Qt/qtheaders are used under Qt's LGPLv2.1 option.

Not changed

  • The "(GPL3)" in the citation abstract in README.rst and doc/source/index.rst, which quotes the published paper.
  • emle-engine (GPLv2+) is an optional runtime import that Sire does not ship, so it does not affect Sire's licence. acknowledgements.rst now says this; the note can be dropped once emle-engine is released under MIT.
  • The Python API in src/ is LGPLv3+ with the rest of the package. It will be relicensed to MIT in a separate PR.

This PR was made with the aid of Claude Code (Opus 5.5).

Testing

  • Full rebuild (corelib and wrappers)
  • Full test suite, in particular tests/maths, tests/analysis and tests/convert/test_rdkit.py
  • Clean install (CI conda build) no longer contains share/Sire/build

Checklist

  • I confirm that I have merged the latest version of devel into this branch before issuing this pull request (e.g. by running git pull origin devel): [y]
  • I confirm that I have added a test for any new functionality in this pull request: [y]
  • I confirm that I have added documentation (e.g. a new tutorial page or detailed guide) for any new functionality in this pull request: [y]
  • I confirm that I have added a changelog entry to the changelog (we will add a link to this PR as part of the review): [y]
  • I confirm that I have permission to release this code under the LGPLv3 license: [y]

@lohedges

Copy link
Copy Markdown
Contributor Author

It looks like the version of MDAnalysis on Python 3.10 isn't new enough. I'll investigate to see if there's a workaround, or guard the test, or drop 3.10 support, which we'll soon do anyway.

@lohedges
lohedges deployed to sire-build October 16, 2026 14:42 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
sire-build — b4d8c47d Deployed Oct 16, 2026 by lohedges via build (3.12, macos) #455
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PROPOSAL]: Relicense Sire from GPLv3+ to LGPLv3+

1 participant