Repository navigation
nitypes: Fix PackageNotFoundError when importing nitypes from a PyInstaller EXE - #310
Merged
Merged
Conversation
Contributor
Test Results 44 files ±0 44 suites ±0 11m 21s ⏱️ -30s Results for commit 9f3d358. ± Comparison against base commit 2f519ca. This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Collaborator
Author
|
@mshafer-NI Please let me know if you have any concerns with this approach or recommend doing it another way. I also considered:
|
csjall
approved these changes
Nov 11, 2026
bkeryan
commented
Nov 11, 2026
Signed-off-by: Brad Keryan <brad.keryan@ni.com>
bkeryan
force-pushed
the
users/bkeryan/fix-version-in-pyinstaller
branch
from
November 11, 2026 21:13
d6810e7 to
b535502
Compare
Signed-off-by: Brad Keryan <brad.keryan@ni.com>
Signed-off-by: Brad Keryan <brad.keryan@ni.com>
Signed-off-by: Brad Keryan <brad.keryan@ni.com>
Signed-off-by: Brad Keryan <brad.keryan@ni.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this Pull Request accomplish?
Make the
nitypes.__version__attribute compatible with PyInstaller:importlib.metadata.version("nitypes")with a string literal so that PyInstaller automatically copies nitypes metadata (documented in https://github.com/pyinstaller/pyinstaller/blob/master/doc/CHANGES.rst#44-2021-07-13).__version__ = "unknown"if the package is not found.Revert workaround for broken
pipinrun_unit_tests_oldest_deps.yml, which I missed in a previous PR.Corresponding nidaqmx PR: ni/nidaqmx-python#1050
Why should this Pull Request be merged?
This is part of the fix for ni/nidaqmx-python#1042
Fixes #311
What testing has been done?
Built and tested a PyInstaller EXE of https://github.com/ni/measurement-plugin-python/tree/main/examples/nidaqmx_analog_input
print(nitypes.__version__)andprint(nidaqmx.__version__)tomain()poetry installpoetry run pip install pyinstallerpoetry run poetry run pyinstaller --onefile --console measurement.pyBefore:
After: (I do not have the discovery service installed on this machine, so this failure is expected)