-
Notifications
You must be signed in to change notification settings - Fork 611
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[BUILD] Optional numpy dependency missing on pyproject.toml #4637
Comments
Sure -- we could even make Numpy a full requirement, if there's no objection. (Technically, I don't think Numpy is required at build time to make the bindings Numpy-compatible -- but if Numpy isn't available at runtime, |
I think we should, since NumPy arrays are the way that blocks of pixels are passed around for quite a few of the API calls. |
Fair enough! tl;dr - I'll just add "numpy>=1.19," as a requirement. Just to confirm -- Larry, you're not using the NumPy C API directly, right? Just stuff from pybind11/numpy.h? If not... this is kind of a rabbit hole. For posterity... If I've understood NumPy's guidelines for downstream package authors correctly, since we're not using the NumPy C API directly, we only need to specify a runtime requirement for numpy. This makes things much easier for us. However -- if we were calling the NumPy C API, we'd want to also add 🥴 As an aside, NumPy's support "drop schedule" is (understandably) more aggressive than the VFX Reference Platform:
Whereas NumPy minor version (non-semver) releases occur every six months; have a support lifespan of 24 months; and support all minor versions of Python released in the past 42 months. This said, we might want to take this opportunity to cull the Python 3.8 wheels bdists all together, moving forward. Python 3.8 reached EOL in October 2024, and NumPy dropped Py3.8 support with v1.22 (April 2023!). Today, the oldest supported version of NumPy is 1.25, for Python 3.10+. For shits and giggles, here's SciPy's Toolchain Roadmap, to compare against the VFX Reference Platform's cadence. Between the two, this gives us a general impression of the upper and lower bounds of "toolchain support window" expectations of both the scientific python community and the VFX community. Riveting. Takeaways:
|
Exactly right. OIIO C++ is blissfully unaware of NumPy, but that's what Pybind11 is using when it passes blocks of pixels around. |
VFX Platform skipped from 3.7 to 3.9, so I don't think we have any VFX Platform constituency that will need 3.8 support. |
When installing the Python OpenImageIO bindings there isn't a way to install optional dependencies.
There is a reference to the optional numpy dependency for Python bindings on the install documentation, but there don't seem to be any optional dependencies specified in
pyproject.toml
.Would it be possible to add numpy as an optional dependency?
The text was updated successfully, but these errors were encountered: