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

Add Python bindings to Brew formula #169

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

aWZHY0yQH81uOYvH
Copy link
Contributor

@aWZHY0yQH81uOYvH aWZHY0yQH81uOYvH commented Dec 21, 2023

Fixes thliebig/openEMS#135 and fixes thliebig/CSXCAD#38.

Python bindings are now installed by default (but can be disabled) when installing with Homebrew.

Currently a draft PR because

  • Is this really the best way to install Python libraries? I really don't like the hard-coded versions, but that seems to be suggested by their guide and it makes installing matplotlib extremely complicated because of all its dependencies. Pending discussion here. An alternative would be to have the end user install packages with pip themselves but that seems counterproductive.
  • Should matplotlib be installed? Currently only cython (from bottle), numpy (from bottle), and h5py (from source) are installed. Those are the only required libraries for the bindings to work, but matplotlib is used in tutorials. It looks like matplotlib would need to be installed from source, which would make the install take forever and would significantly complicate things.
  • Given the fixed version of the packages, should a Python 3 sub-version be pinned (like 3.12) instead of just specifying the latest Python 3?
  • When uninstalled via brew, openEMS and CSXCAD remain as weird ghost empty packages that can be imported but don't contain anything.

@aWZHY0yQH81uOYvH
Copy link
Contributor Author

I think this is ready now. There is now a matplotlib bottle, and I decided to just use pip to install the latest version of h5py instead of pulling some specific version since that sounds annoying to maintain.

Also the "ghost package" thing I mentioned was just some empty directories with __pycache__ stuff in them. Not a big deal.

@aWZHY0yQH81uOYvH aWZHY0yQH81uOYvH marked this pull request as ready for review March 11, 2024 11:10
@aWZHY0yQH81uOYvH
Copy link
Contributor Author

Also @thliebig ping on this one if you haven't seen it recently. I fixed it up yesterday.

@thliebig thliebig merged commit af8d6e7 into thliebig:master Mar 11, 2024
@aWZHY0yQH81uOYvH aWZHY0yQH81uOYvH deleted the python-brew branch March 11, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants