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

setup.py install does not install enough for sasview to work #3075

Open
llimeht opened this issue Aug 21, 2024 · 0 comments
Open

setup.py install does not install enough for sasview to work #3075

llimeht opened this issue Aug 21, 2024 · 0 comments

Comments

@llimeht
Copy link
Contributor

llimeht commented Aug 21, 2024

Describe the bug
setup.py install should install sasview and have it work; running tests assumes that it does work and so this is called from CI.

However, setup.py doesn't know about any of the non-python files ("package-data" in setuptools parlance) that sasview requires. There's are hundreds of images, icons, stylesheets etc that are required at runtime.

This is papered over in installers/sasview.spec with a curated list of data files to include. Pushing this into the sasview package itself so that they land in the wheel will help clean up numerous pain points... including making sasview installable via pip.

To Reproduce
Steps to reproduce the behavior:

  1. create venv, enter it, install deps as normal
  2. git clone ...
  3. pip install .
  4. sasview
  5. See error

Expected behavior
sasview installation in the venv is a working installation

Errors
FileNotFoundError for sas/qtgui/images/SVwelcome.png that results in sasview crashing immediately. (And if you fix that one, there are many more)

SasView version (please complete the following information):

  • Version: git HEAD (main branch tested)

Operating system (please complete the following information):

  • OS: Linux (but that's not relevant)

Additional context
Copying the files in manually lets sasview start - we're not a million miles from this working. The config really just needs to get into pyproject.toml (or at worst setup.py) and then wheels become a simple reality.

Crudely (and copying more that strictly necessary in order to get it working...):

$ find sasview/src/sas/qtgui/ -type d | cut -d/ -f3- | while read d; do mkdir -p venv/lib/python3.11/site-packages/$d ; done
$ find sasview/src/sas/qtgui/ -type f \! -name \*py | cut -f3- -d/ | while read f; do cp "sasview/src/$f" venv/lib/python3.11/site-packages/$f; done
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

No branches or pull requests

1 participant