Skip to content

Fix hardcoded commoncode wheel path in configure.bat (fixes #5480) - #5481

Open
muskan-creates352 wants to merge 1 commit into
aboutcode-org:developfrom
muskan-creates352:fix-windows-configure-wheel-5480
Open

muskan-creates352 wants to merge 1 commit into
aboutcode-org:developfrom
muskan-creates352:fix-windows-configure-wheel-5480

Conversation

@muskan-creates352

Copy link
Copy Markdown

Fixes #5480

Problem

On Windows, running configure.bat fails with:
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '...dist\commoncode-32.5.2-py3-none-any.whl'
because the wheel filename was hardcoded to commoncode-32.5.2-py3-none-any.whl while flot builds commoncode-33.0.0-py3-none-any.whl.

Solution

Updated configure.bat to dynamically locate and install dist\commoncode*.whl using a wildcard loop, matching the behavior of the POSIX configure script.

Checklist

  • Signed-off-by included in commit message
  • Tested locally on Windows 11 with Python 3.11

@muskan-creates352

muskan-creates352 commented Nov 26, 2026 •

Copy link
Copy Markdown
Author

@kmlyz plz ptal...

@kmlyz kmlyz left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for working on #5480. Two edge cases stand out with the dist\commoncode*.whl loop in configure.bat:

  • If flot fails or no wheel matches, the loop exits 0 without running pip and falls through to installing PyPI commoncode.
  • On re-runs without clean, stale wheels in dist can install out of order, for example commoncode-33.0.0 before commoncode-33.0.0rc1 since "-" sorts before "r".

Removing old commoncode wheels before running flot and failing when no wheel is found would avoid both.

…-org#5480)

Signed-off-by: Muskan Kumari <er.muskan09@gmail.com>
@muskan-creates352
muskan-creates352 force-pushed the fix-windows-configure-wheel-5480 branch from 1251ce4 to 192a636 Compare November 27, 2026 13:26
@muskan-creates352

Copy link
Copy Markdown
Author

Thanks for the thorough review and catch @kmlyz!

I have updated the PR to handle both edge cases:

  1. Remove any existing dist\commoncode*.whl files before invoking flot to prevent stale wheels from being installed on re-runs.
  2. Added error checking after flot and check that COMMONCODE_WHEEL is found, exiting with an error if no matching wheel is present in dist\.
  3. Verified the error code propagation after pip install.

The commit has been updated with DCO sign-off.

@kmlyz kmlyz left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for the quick update, @muskan-creates352. Verified the updated configure.bat logic on 192a636 with empty-dist and stale-wheel cmd.exe checks, and both exit-code handling and wheel selection look good alongside green win2022 and win2025 CI runs.

@muskan-creates352

Copy link
Copy Markdown
Author

Thank you @kmlyz for verifying and for the helpful feedback!

This branch has not been deployed

No deployments
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.

[BUG] configure.bat fails on Windows: hardcoded commoncode-32.5.2-py3-none-any.whl path does not exist

2 participants