Skip to content

Conversation

@llimeht
Copy link
Contributor

@llimeht llimeht commented Nov 6, 2025

The auxiliary files for the two yukawa model aren't making it into the pyinstaller bundles as they are neither imported somewhere nor listed as data files. The result is that the two yukawa model can't be imported by sasview at runtime and so crashes on startup (yes, sasview should probably figure out some protection against this too).

This PR adds the sasmodels.TwoYukawa modules to the list of hiddenimports so that pyinstaller inserts them into bundles when using them.

This will eventually solve SasView/sasview#3664

@llimeht llimeht requested a review from butlerpd November 6, 2025 10:18
@butlerpd
Copy link
Member

The only remaining test to do before normal approval would be to verify the installer actually does work. However, to do that would require changing the CI files as documented on the wiki to use sasmodels/branch_x rather than master, but at this point, I think our CI infrastructure has gotten sophisticated enough that we don't want every developer playing around with that?

I think we should just merge this on @pkienzle approval and create an issue for the installer testing from a sasdata or sasmodels branch

@llimeht
Copy link
Contributor Author

llimeht commented Nov 16, 2025

The only remaining test to do before normal approval would be to verify the installer actually does work. However, to do that would require changing the CI files as documented on the wiki to use sasmodels/branch_x rather than master, but at this point, I think our CI infrastructure has gotten sophisticated enough that we don't want every developer playing around with that?

It's also possible to build the installer locally which is what I did in testing this work. In whatever venv you have installed this branch of sasmodels and also have sasview plus pyinstaller installed:

cd sasview/installers/ && pyinstaller sasview.spec

the hiddenimport moduels are recursively analysed which then picks up the
other files.
Copy link
Member

@butlerpd butlerpd left a comment

Choose a reason for hiding this comment

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

installer behaves as it should. all looks good now.

@butlerpd butlerpd merged commit b3f8980 into SasView:master Nov 17, 2025
13 checks passed
@llimeht llimeht deleted the tmp/twoyukawa-imports branch November 18, 2025 03:08
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.

3 participants