Skip to content

In setup.py, don't limit CMake version test to only Windows - #995

Merged
mhucka merged 5 commits into
quantumlib:mainfrom
mhucka:mh-setup-remove-test
Jan 15, 2026
Merged

In setup.py, don't limit CMake version test to only Windows#995
mhucka merged 5 commits into
quantumlib:mainfrom
mhucka:mh-setup-remove-test

Conversation

@mhucka

@mhucka mhucka commented Jan 14, 2026

Copy link
Copy Markdown
Collaborator

The CMakeBuild class' run() method tests the version of CMake; however, it did the test only when on Windows. It seems like this is a test worth doing everywhere, so I removed test for Windows.

In addition, while at it, I slightly updated the way the process output is captured, and expanded the range of exceptions tested in order to provide more specific feedback to users.

The `CMakeBuild` class' `run()` method tests the version of CMake;
however, it did the test only when on Windows. It seems like this is a
test worth doing everywhere, so I removed the condition on Windows.
@github-actions github-actions Bot added the size: S 10< lines changed <50 label Jan 14, 2026
@mhucka
mhucka marked this pull request as ready for review January 15, 2026 00:06
@mhucka
mhucka requested a review from sergeisakov January 15, 2026 00:06

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly generalizes the CMake version check to all platforms, not just Windows. The added exception handling for subprocess.check_output improves the robustness of the build script. However, I found a critical issue in the new OSError exception handler that could lead to an AttributeError, masking the original error. Please see my specific comment for details and a suggested fix.

Comment thread setup.py Outdated
mhucka and others added 3 commits January 15, 2026 00:11
Yep, Gemini is right.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@mhucka
mhucka enabled auto-merge January 15, 2026 05:13
@mhucka
mhucka added this pull request to the merge queue Jan 15, 2026
Merged via the queue into quantumlib:main with commit 549bab5 Jan 15, 2026
28 checks passed
@mhucka
mhucka deleted the mh-setup-remove-test branch January 15, 2026 15:32
mhucka added a commit to mhucka/qsim that referenced this pull request Jan 18, 2026
…mlib#995)

The `CMakeBuild` class' `run()` method tests the version of CMake;
however, it did the test only when on Windows. It seems like this is a
test worth doing everywhere, so I removed test for Windows.

In addition, while at it, I slightly updated the way the process output
is captured, and expanded the range of exceptions tested in order to
provide more specific feedback to users.

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: S 10< lines changed <50

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants