Skip to content

Commit 2e77b05

Browse files
authored
🎨 Do not rebuild MQT Core in tests (#714)
## Description This PR changes the test setup to not rebuild MQT Core from source. Related to munich-quantum-toolkit/qcec#661 ## Checklist: - [x] The pull request only contains commits that are focused and relevant to this change. - [x] ~~I have added appropriate tests that cover the new/changed functionality.~~ - [x] ~~I have updated the documentation to reflect these changes.~~ - [x] I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals. - [x] I have added migration instructions to the upgrade guide (if needed). - [x] The changes follow the project's style guidelines and introduce no new warnings. - [x] The changes are fully tested and pass the CI checks. - [x] I have reviewed my own code changes.
1 parent d693d08 commit 2e77b05

4 files changed

Lines changed: 23 additions & 27 deletions

File tree

.readthedocs.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
version: 2
22

33
formats:
4-
# - pdf
54
- htmlzip
5+
# - pdf
6+
7+
sphinx:
8+
configuration: docs/conf.py
69

710
build:
811
os: ubuntu-24.04
@@ -30,9 +33,9 @@ build:
3033
- asdf global uv latest
3134
- wget https://github.com/Z3Prover/z3/releases/download/z3-4.13.4/z3-4.13.4-x64-glibc-2.35.zip
3235
- unzip z3-4.13.4-x64-glibc-2.35.zip -d ~/
33-
# Set up build time dependencies including a source distribution of mqt-core.
34-
- uv sync --only-group build --only-group docs --no-binary-package mqt-core
35-
# The default version of CMake on Ubuntu 24.04 is too old, so we need to install a newer version.
36+
# Set up build-time dependencies
37+
- uv sync --only-group build --only-group docs
38+
# Install CMake because the default version on Ubuntu 24.04 is too old
3639
- uv pip install cmake
3740
build:
3841
html:
@@ -41,11 +44,8 @@ build:
4144
- Z3_ROOT=~/z3-4.13.4-x64-glibc-2.35 uv run --frozen --no-dev --no-build-isolation-package mqt-qmap -m sphinx -T -b dirhtml -d docs/_build/doctrees -D language=en docs docs/_build/dirhtml
4245
- mkdir -p $READTHEDOCS_OUTPUT/htmlzip
4346
- zip -r $READTHEDOCS_OUTPUT/htmlzip/html.zip docs/_build/dirhtml/*
44-
# pdf:
45-
# - Z3_ROOT=~/z3-4.13.4-x64-glibc-2.35 uv run --frozen --no-dev --no-build-isolation-package mqt-qmap -m sphinx -T -b latex -d docs/_build/doctrees -D language=en docs docs/_build/latex
46-
# - cd docs/_build/latex && latexmk -pdf -f -dvi- -ps- -interaction=nonstopmode -jobname=$READTHEDOCS_PROJECT
47-
# - mkdir -p $READTHEDOCS_OUTPUT/pdf
48-
# - cp docs/_build/latex/$READTHEDOCS_PROJECT.pdf $READTHEDOCS_OUTPUT/pdf/$READTHEDOCS_PROJECT.pdf
49-
50-
sphinx:
51-
configuration: docs/conf.py
47+
# pdf:
48+
# - Z3_ROOT=~/z3-4.13.4-x64-glibc-2.35 uv run --frozen --no-dev --no-build-isolation-package mqt-qmap -m sphinx -T -b latex -d docs/_build/doctrees -D language=en docs docs/_build/latex
49+
# - cd docs/_build/latex && latexmk -pdf -f -dvi- -ps- -interaction=nonstopmode -jobname=$READTHEDOCS_PROJECT
50+
# - mkdir -p $READTHEDOCS_OUTPUT/pdf
51+
# - cp docs/_build/latex/$READTHEDOCS_PROJECT.pdf $READTHEDOCS_OUTPUT/pdf/$READTHEDOCS_PROJECT.pdf

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ This project adheres to [Semantic Versioning], with the exception that minor rel
99

1010
## [Unreleased]
1111

12+
### Fixed
13+
14+
- 🚸 Increase binary compatibility between `mqt-qmap`, `mqt-core`, and `mqt-qcec` ([#714]) ([**@denialhaag**])
15+
1216
## [3.2.0] - 2025-07-16
1317

1418
_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md#320)._
@@ -101,6 +105,7 @@ _📚 Refer to the [GitHub Release Notes] for previous changelogs._
101105

102106
<!-- PR links -->
103107

108+
[#714]: https://github.com/munich-quantum-toolkit/qmap/pull/714
104109
[#712]: https://github.com/munich-quantum-toolkit/qmap/pull/712
105110
[#694]: https://github.com/munich-quantum-toolkit/qmap/pull/694
106111
[#665]: https://github.com/munich-quantum-toolkit/qmap/pull/665

UPGRADING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ This document describes breaking changes and how to upgrade. For a complete list
44

55
## [Unreleased]
66

7+
Testing previous versions of the `mqt-qmap` package built via `uv sync` or simple `(uv) pip install .` generally failed due to binary incompatibility of the `mqt-core` compiled extension packages and the `mqt-qmap` one.
8+
This required building `mqt-core` from source and without build isolation to get a working local setup.
9+
By using the latest `pybind11` release (`v3`), the binary compatibility between extension modules compiled under different circumstances (such as different compilers) has been greatly increased.
10+
As such, it is no longer necessary to build `mqt-core` (and `mqt-qcec` for testing) from source and without build isolation when locally working on `mqt-qmap`.
11+
A simple `uv sync` is enough to successfully run `pytest`.
12+
713
## [3.2.0]
814

915
With this release, the Python package has been restructured.

noxfile.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,6 @@ def _run_tests(
6666
"build",
6767
"--only-group",
6868
"test",
69-
# Build mqt-core from source to work around pybind believing that two
70-
# compiled extensions might not be binary compatible.
71-
# This will be fixed in a new pybind11 release that includes https://github.com/pybind/pybind11/pull/5439.
72-
"--no-binary-package",
73-
"mqt-core",
74-
# Similarly to above, build mqt-qcec from source because otherwise there
75-
# might be binary compatibility issues with the compiled extensions.
76-
# This can be removed once the above is no longer necessary.
77-
"--no-binary-package",
78-
"mqt-qcec",
7969
*install_args,
8070
env=env,
8171
)
@@ -158,11 +148,6 @@ def docs(session: nox.Session) -> None:
158148
"build",
159149
"--only-group",
160150
"docs",
161-
# Build mqt-core from source to work around pybind believing that two
162-
# compiled extensions might not be binary compatible.
163-
# This will be fixed in a new pybind11 release that includes https://github.com/pybind/pybind11/pull/5439.
164-
"--no-binary-package",
165-
"mqt-core",
166151
env=env,
167152
)
168153

0 commit comments

Comments
 (0)