Skip to content

Commit

Permalink
Use numpy/tuples in place of Imath types
Browse files Browse the repository at this point in the history
Also:
- Use single-element array for DoubleAttribute
- Use fractions.Fraction for Rational
- Use 8-element tuple for chromaticities
- Add __enter__/__exit__ so "with" works with File object
- remove operator== entirely, it's way too hard to implement something that's
  actually useful for testing purposes. The tests do their own validations.

Signed-off-by: Cary Phillips <[email protected]>

pixel comparison

Signed-off-by: Cary Phillips <[email protected]>
  • Loading branch information
cary-ilm committed Jun 2, 2024
1 parent 92f8782 commit 97d2235
Show file tree
Hide file tree
Showing 7 changed files with 1,303 additions and 883 deletions.
3 changes: 2 additions & 1 deletion src/wrappers/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ if(NOT "${CMAKE_PROJECT_NAME}" STREQUAL "OpenEXR")
find_package(OpenEXR)
endif()

find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
find_package(Python COMPONENTS Interpreter Development.Module NumPy REQUIRED)
find_package(pybind11 CONFIG REQUIRED)

python_add_library (PyOpenEXR MODULE PyOpenEXR.cpp PyOpenEXR_old.cpp)

target_link_libraries (PyOpenEXR PRIVATE "${Python_LIBRARIES}" OpenEXR::OpenEXR pybind11::headers)
include_directories(${Python_NumPy_INCLUDE_DIRS})

# The python module should be called "OpenEXR.so", not "PyOpenEXR.so",
# but "OpenEXR" is taken as a library name by the main lib, so specify
Expand Down
Loading

0 comments on commit 97d2235

Please sign in to comment.