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

Remove psutil hard dependency #1127

Merged
merged 2 commits into from
Apr 20, 2023
Merged

Remove psutil hard dependency #1127

merged 2 commits into from
Apr 20, 2023

Conversation

banesullivan
Copy link
Contributor

@banesullivan banesullivan commented Apr 20, 2023

This is a soft dependency and the only one that isn't readily available in the most minimal Python environments (pyodide).

Removing psutil should make the following source modules installable in pyodide (from a quick glance at dependencies... need to verify these actually work though)

  • large-image-source-deepzoom
  • large-image-source-dicom
  • large-image-source-openjpeg
  • large-image-source-pil
  • large-image-source-vips

It is well handled if psutil is missing:

if psutil:
memory = psutil.virtual_memory().total
else:
memory = 1024 ** 3

and the only other place it is used is in large-image-converter (and the girder modules) which has it as a hard dependency:

https://github.com/girder/girder/blob/d994d93a00257a17eeeab7e0b6fa4a54f5658550/setup.py#L39

@manthey
Copy link
Member

manthey commented Apr 20, 2023

Maybe we should move it to the performance extras_require?

@banesullivan
Copy link
Contributor Author

Happy to .. wasn't sure which of those extras was the best fit, so I left it out. Will add there now.

@banesullivan banesullivan merged commit 5382afc into master Apr 20, 2023
@banesullivan banesullivan deleted the psutil branch April 20, 2023 21:42
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.

2 participants