Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude builtin test.support modules from being loaded with Operation Modules #2299

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

MikeSullivan7
Copy link
Collaborator

Issue

Closes #2298

Description

In both mantidimaging/core/operations/loader.py and packaging/PackageWithPyInstaller.py we now check if the module name aligns with that in the builtin test modules and exclude it if it does.

Testing

make check

Acceptance Criteria

rebuild dev env
make a Windows build via packaging/PackageWithPyInstaller.py
check that the Windows build does not contain any AssertionErrors related to the Operations modules.

Documentation

release note

@coveralls
Copy link

coveralls commented Aug 1, 2024

Coverage Status

coverage: 73.051% (-0.02%) from 73.069%
when pulling cda45da on 2298_prevent_builtin_tests_hidden_import
into ae9b136 on main.

@samtygier-stfc
Copy link
Collaborator

I am seeing this again. It should have been fixed by #2276 and I see it on main too, so its not a regression from this PR.

Traceback (most recent call last):
  File "mantidimaging/__main__.py", line 16, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
  File "mantidimaging/main.py", line 17, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
  File "mantidimaging/core/__init__.py", line 5, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
  File "mantidimaging/core/io/__init__.py", line 5, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
  File "mantidimaging/core/io/saver.py", line 10, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
  File "h5py/__init__.py", line 25, in <module>
ImportError: /home/sam/git/mantidimaging/packaging/dist/MantidImaging/_internal/libssl.so.3: version `OPENSSL_3.2.0' not found (required by /home/sam/git/mantidimaging/packaging/dist/MantidImaging/_internal/./libcurl.so.4)
[1367507] Failed to execute script '__main__' due to unhandled exception

If you are happy that this improves things on windows I'll merge it, the openssl probably can be a separate issue.

@samtygier-stfc samtygier-stfc added this pull request to the merge queue Aug 1, 2024
Merged via the queue into main with commit 4370485 Aug 1, 2024
6 checks passed
@samtygier-stfc samtygier-stfc deleted the 2298_prevent_builtin_tests_hidden_import branch August 1, 2024 15:09
@samtygier-stfc
Copy link
Collaborator

With the coping libraries into dist kludge from #2300 I can confirm the issue and the fix on linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PackageWithPyInstaller.py includes non-existent Hidden Imports
3 participants