-
Notifications
You must be signed in to change notification settings - Fork 285
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
MAINT: Add NumPy include dir during build #1291
Conversation
Okay this was much harder than I thought. NumPy on Python 3.12 has dropped numpy.distutils, so we need to get rid of that. Might as well refactor for full |
class MyClean(clean.clean): | ||
"""Reimplements to remove the extension module array_ext to guarantee a | ||
fresh rebuild every time. The module hanging around could introduce | ||
problems when doing develop for a different vtk version.""" | ||
def run(self): | ||
MY_DIR = os.path.dirname(__file__) | ||
|
||
ext_file = os.path.join( | ||
MY_DIR, | ||
"tvtk", | ||
"array_ext" + (".pyd" if sys.platform == "win32" else ".so") | ||
) | ||
|
||
if os.path.exists(ext_file): | ||
print("Removing in-place array extensions {}".format(ext_file)) | ||
os.unlink(ext_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't working anyway, on my system the generated file is tvtk/array_ext.cpython-311-x86_64-linux-gnu.so
for example. We can revisit at some point if needed
cherry-picked 3 commits from #1290 in an effort to get CIs green (can remove/revert later if that PR isn't merged before this one) |
GREEN! |
Just kidding... 3.12 (well really VTK 9.3) is still problematic. Based on some traceback and some local testing I think something is overwriting some memory where it shouldn't or something because the default trait it's trying to set are junk 😱 I vaguely recall having to fix something like this a while ago, I'll need to look up how I did it. |
Thank you for working on this - need this for Fedora support. However it seems like the array_ext module isn't getting generated at all for me. Is this intentional? |
No that's not intentional, it should be :( Locally I get that it is generated, and on CIs you can see it for example here. It should show up at the very least if you do
|
Okay, I think it's an issue with the Fedora pyproject build macros, but I can stick with the classic python build macros for now. This fixes the Fedora build so it would be nice to see it merged. FWIW - we are still at VTK 9.2.6. |
I opened upstream https://gitlab.kitware.com/vtk/vtk/-/issues/19252 but I'll try to find a way to patch it here... |
Okay:
Everything is finally green for real on VTK 9.2.6 and 9.3 and Python 3.12. The corresponding mayavi-feedstock is also green so I think we should be good here! I know the |
Could be -- but |
@prabhuramachandran when you get a chance can you
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, extensive changes. Thank you so much @larsoner, looks good to me.
Done.
I don't see these options yet on the branch protection rules page, I suspect I will need to merge this first and do it.
Will do now. |
Needed to get conda-forge/mayavi-feedstock#77 builds working. Not sure why it wasn't required before/elsewhere! But should be safe/more complete to always have it I think.