Skip to content

Relicense Sire's Python API from LGPLv3+ to MIT - #512

Merged
lohedges merged 6 commits into
develfrom
feature_mit
Oct 22, 2026
Merged

lohedges merged 6 commits into
develfrom
feature_mit

Conversation

@lohedges

@lohedges lohedges commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

This PR relicenses Sire's Python API under the MIT License. Everything else stays LGPLv3+. All copyright holders of code in the affected files have agreed to the change in #511. As such, this closes #511.

The MIT part covers the Python source in src/, plus wrapper/Convert/SireOpenMM/_perturbablemol.py and wrapper/Convert/SireOpenMM/_sommcontext.py, which implement the OpenMM layer used by the Python API. The C++ libraries, their Python wrappers, the wrapper generation tooling and the legacy Python tools in wrapper/ remain LGPLv3+.

Changes

  • LICENSE (and recipes/sire/LICENSE): a short explanation of the split, followed by the MIT License text, then the LGPLv3 and GPLv3 text as before. The MIT copyright line is "The Sire contributors" with no year, since contributors keep their copyright and it never needs updating.
  • SPDX headers: every Python file in src/ starts with # SPDX-License-Identifier: MIT, so the licence travels with any file copied out of the repository. _perturbablemol.py and _sommcontext.py get the same line, plus a comment explaining why they differ from the rest of wrapper/.
  • Metadata: setup.py and the generated conda recipe use LGPL-3.0-or-later AND MIT.
  • README and docs: a new License section in README.rst and a license.rst page in the docs, plus an updated licence statement in acknowledgements.rst.
  • PR template: the licence confirmation now refers to the MIT/LGPL split.
  • Changelog entry.

Third-party code found during the audit

  • Console in src/sire/utils/_console.py contained a variable-name lookup copied from a Stack Overflow answer (CC BY-SA), once in an unused _retrieve_name method and again inline in debug(). The unused method is removed and the inline version is rewritten. Behaviour is unchanged: the last matching name in the caller's scope is used, falling back to "variable".
  • _pythonize.py credits a Stack Overflow post for inspiration, but its implementation is Sire's own. _progressbar.py links to the answer behind its one-line "IPKernelApp" in get_ipython().config notebook check, which is a standard IPython idiom and too small to be covered by copyright.
  • _console.py was brought in from MetaWards (GPL), which was written by chryswoods and is covered by his agreement.

Contributors were checked with git log --follow and git blame -M -C across the 2022 move of files from wrapper/ into src/. Earlier authors of those files have no surviving lines.

Not changed

  • Python in tests/, doc/ and the rest of wrapper/ stays LGPLv3+. The tests mostly test the LGPL core, so they keep its licence.

@lohedges
lohedges deployed to sire-build October 21, 2026 20:36 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 21, 2026 20:36 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 21, 2026 20:36 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 21, 2026 20:36 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 21, 2026 20:36 — with GitHub Actions Active
@lohedges
lohedges merged commit 1234750 into devel Oct 22, 2026
5 checks passed
@lohedges
lohedges deleted the feature_mit branch October 22, 2026 05:29

This branch was successfully deployed

1 active deployment
sire-build — bd4b45d2 Deployed Oct 21, 2026 by lohedges via build (3.12, macos) #458
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's Python API from LGPLv3+ to MIT

1 participant