-
Notifications
You must be signed in to change notification settings - Fork 119
Build with mesonpy #433
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
base: main
Are you sure you want to change the base?
Build with mesonpy #433
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #433 +/- ##
==========================================
+ Coverage 86.72% 86.74% +0.01%
==========================================
Files 24 24
Lines 3435 3439 +4
==========================================
+ Hits 2979 2983 +4
Misses 456 456 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
FYI, the meson build currently packages all files in the subdirs of There is likely a better way to do this that doesn't include all the extra stuff - perhaps using some sort of file type filter before running |
|
Not sure how to do that exactly, the docs aren't very clear. If we can't figure out a way I don't think it's a deal breaker, think it's also been the case since basically the beginning, so I propose that we merge and deal with it in the future. |
|
FYI, the real issue is dug into an error log dropdown printout: I am not familiar with compilers on Windows, but looking at some discussions like this one (or this one - does the Windows build use Visual Studio in the backend?)we might need to update a compiler option or link to the missing library |
|
I think this is finally ready? CC @marcomangano @eirikurj @whophil @kanekosh |
|
LGTM 🚀 |
|
Maybe it is a problem with my machine, but when I try and editable installation I am getting this error: It works with the non-editable installation and I double-checked that the issue is introduced with this PR. I am not familiar with Meson machinery, but it looks like it is trying to do some kind of build at runtime and it is missing the ninja library used at build-time and stored in a temporary folder? |
|
Ah I was wondering if I needed to include |
|
I am sorry I was unclear, the build works just fine, the error above occurs whenever you try and import |
|
I see, it seems that the behaviour here is a little different from
So, I'm not sure what we want to do. I think the dev experience is slightly degraded but not making |
|
I need to look into the discussion a bit more in detail, but I think a practical solution could be enabling something like Since we only (aside minor exceptions) work with python, it feels weird to recompile (even if it is just through |
|
EDIT: the |
|
Circling back on this, what do we think? Is this ready to be merged? @marcomangano @whophil @kanekosh @eirikurj |
|
This is a bit old, could somebody sync this with main to see if it still builds? |
|
I will check and test again the PR later (apologies for being AWOL as a maintainer), but I just want to double check if I get the editable build instructions right @ewu63 : If I don't want to upgrade my whole environment to numpy > 2.0, can I temporarily upgrade numpy, build/install the package, and then revert back to numpy 1.2x.xx to run my optimizations? Or should I just give up on the editable install if I still want to use numpy 1 at runtime? |
I think that should work but not 100% sure. In general I caution against editable installs unless you are actually developing stuff in pyOptSparse. I found a quirky issue with editable installs. Because meson will use a separate build dir to store the compiled .so libraries (i.e. out-of-tree build) and rely on some import hook to manage this, our
Thoughts @whophil ?
I am OK with adding a separate group of optional deps. |
Purpose
Continuation of #431 but from the mdolab branch to test all optimizers.
Expected time until merged
Type of change
Testing
Checklist
flake8andblackto make sure the Python code adheres to PEP-8 and is consistently formattedfprettifyor C/C++ code withclang-formatas applicable