Skip to content

Avoid bundling duplicate libmathcat_py.pyd#20081

Merged
seanbudd merged 2 commits into
nvaccess:masterfrom
RyanMcCleary:libmathcat-exclude
May 8, 2026
Merged

Avoid bundling duplicate libmathcat_py.pyd#20081
seanbudd merged 2 commits into
nvaccess:masterfrom
RyanMcCleary:libmathcat-exclude

Conversation

@RyanMcCleary
Copy link
Copy Markdown
Contributor

@RyanMcCleary RyanMcCleary commented May 7, 2026

Link to issue number:

Closes #20046

Summary of the issue:

libmathcat_py.pyd is created both in the NVDA installation directory and in include\nvda-mathcat\assets.

Description of user facing changes:

Reduces the size of the launcher by ~4 MB.

Description of developer facing changes:

None; libmathcat_py can still be imported the same way. The duplicate being removed was not imported or used by any other code.

Description of development approach:

Excludes importable files in the same way that is already used for synthDrivers on line 389 of setup.py.

Testing strategy:

Built and checked that libmathcat_py.pyd is no longer duplicated, and read math in Chrome as a smoke test.

Known issues with pull request:

None.

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@RyanMcCleary RyanMcCleary marked this pull request as ready for review May 8, 2026 00:18
@RyanMcCleary RyanMcCleary requested a review from a team as a code owner May 8, 2026 00:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates NVDA’s frozen-build packaging rules to avoid shipping an extra copy of libmathcat_py.pyd from the bundled MathCAT assets, reducing installer/launcher size while keeping libmathcat_py import behavior unchanged.

Changes:

  • Exclude importable module suffixes (via importlib.machinery.all_suffixes()) when recursively collecting ../include/nvda-mathcat/assets data files, matching the existing approach already used for other bundled directories.

Comment thread source/setup.py
@seanbudd seanbudd removed the request for review from SaschaCowley May 8, 2026 01:15
Copy link
Copy Markdown
Member

@seanbudd seanbudd left a comment

Choose a reason for hiding this comment

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

Thanks @RyanMcCleary

@seanbudd seanbudd merged commit c72002e into nvaccess:master May 8, 2026
33 of 37 checks passed
@github-actions github-actions Bot added this to the 2026.2 milestone May 8, 2026
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.

Duplicate "libmathcat_py.pyd" is included

3 participants