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

feat: Python wheels workflow and build backend #4428

Open
wants to merge 174 commits into
base: main
Choose a base branch
from

Commits on Sep 16, 2024

  1. build: Improve Python3 component detection

    The build system has been updated to specifically detect the Python3 Development.Module meta component, as opposed to the entire Development component. This allows for better compatibility with python distributions that do not provide the Development.Embed component, which is only required for projects that ship embedded Python interpreters. The changes have been made in CMakeLists.txt and pythonutils.cmake files.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    d8e0955 View commit details
    Browse the repository at this point in the history
  2. Add pyproject.toml for building wheels with scikit-build-core

    Scikit-build-core is used for collecting CMake and Ninja as needed, and for invoking the build. When invoked via cibuildwheels, `repairwheel` is used after each build to re-bundle and relink the shared library dependencies into properly redistributable whl archives. The command-line tools are exposed under the [project.scripts] section.
    This commit incorporates or is otherwise inspired by similar efforts by @aclark4life and @JeanChristopheMorinPerso, as well as @remia's work on the OpenColorIO wheels.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    df83fc8 View commit details
    Browse the repository at this point in the history
  3. int(python): Adjust module metadata

    Use Apache-2.0 license identifier instead of BSD-3-Clause.
    Add "OpenImageIO Contributors" / "[email protected]" as author.
    I could not bring myself to remove Larry as an author and maintainer.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    5e86b2d View commit details
    Browse the repository at this point in the history
  4. build(deps): Improve ability to build, link, and alias shared and sta…

    …tic libdeflate
    
    It's now possible to disable building of shared `libdeflate` libs.
    
    Also, we're checking for and aliasing `libdeflate` in `externalpackages.cmake`, just before checking for TIFF, as opposed to only doing so within `build_TIFF.cmake`. This change is necessary for certain build systems and pipelines that utilize cached dependency builds.
    
    Specifically, when building wheels for multiple versions of cpython, `cibuildwheel` would complete the first build, and then throw an exception on the *second* build re: not being able to find `Deflate::Deflate`. Moving the aliasing above the check for TIFF ensures that the expected aliasing always takes place, whether or not TIFF needs to be built; whereas before, we were only creating the alias when initially building TIFF.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    ea2432a View commit details
    Browse the repository at this point in the history
  5. build(deps): Add libjpeg-turbo recipe

    Build and link missing libjpeg-turbo shared + static libs
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    5c1a1b8 View commit details
    Browse the repository at this point in the history
  6. refactor: Simplify structure of Python module

    Instead of creating a separate OpenImageIO.OpenImageIO.command_line module for the CLI shims, move the CLI shim logic up to a "_command_line()" method in OpenImageIO.__init__.py.
    (Maybe this method should still be called "main()" though?)
    
    This also means the module is technically importable from OpenImageIO.OpenImageIO, but that's an improvement over OpenImageIO.OpenImageIO.OpenImageIO...!
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    78fed97 View commit details
    Browse the repository at this point in the history
  7. docs: clarify that IBA::rotate params are pixel coordinates (AcademyS…

    …oftwareFoundation#4358)
    
    As suggested by Moritz Moeller
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    bd271a3 View commit details
    Browse the repository at this point in the history
  8. build: A few cmake cleanups and minor code rearrangements (AcademySof…

    …twareFoundation#4359)
    
    * Get rid of some obsolete cmake code.
    
    * Movement (but no change) to some parts of CMakeLists.txt, primarily to
    make it closer to the corresponding file in OSL to make it easy for me
    to diff them and port innovations back and forth between them.
    
    * Some typo/etc fixes
    
    * Remove unused OIIO_UNUSED_OK macro that's been deprecated since 2.0,
    and OIIO_CONSTEXPR and OIIO_CONSTEXPR14, neither of which have been
    needed for years.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    d298bad View commit details
    Browse the repository at this point in the history
  9. Revert libdeflate-related changes to externalpackages.cmake

    This seems to break builds under certain circumstances. Better to handle the problem with cached rebuilds another way, either in a FindLibdeflate.cmake, or by always locally-building libdeflate and TIFF.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    f9d7f21 View commit details
    Browse the repository at this point in the history
  10. build(python): set RPATHs to relative paths to distribution's 'libs' …

    …directory, under module root
    
    Added conditional logic to set relative RPATHs when building with scikit-build. This change ensures that the Python module and compiled cli tools correctly find all built dynamic libraries relative to a shared root, and keeps distributions self-contained and relocatable (i.e., without requiring a `repairwheel` step).
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    f555161 View commit details
    Browse the repository at this point in the history
  11. build(python): Improve pip-based build experience

    * The build-directory is no longer hard-coded to a local "build_wheels" path.
    The 'repairwheel' tool needs to know where it can find any dynamic libs compiled by the build system; and, frustratingly, doesn't seem to consider libraries already bundled in the whl. We can either point repairwheel to directory within an unzipped whl; or, we can point repairwheel back to where the compiled dependencies live inside the build-directory, under .../dist/deps/lib. There isn't a straightforward way of passing information from skbuild to repairwheel directly; but here, we're using cibw to set an environment variable dictating to where scikit-build-core builds, which we can also reference in the repair-wheel step.
    
    * Always (re)build the TIFF dependency when building local wheels.
    This is a workaround for an issue where "Deflate::Deflate" either can't be found, or can't be redeclared, under certain circumstances. A more robust solution might be to instead write a FindLibdeflate.cmake module that adds an alias for Deflate::Deflate as needed.
    
    * Add "wheelhouse" directory created by cibuildwheel to .gitignore.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    5f70b0a View commit details
    Browse the repository at this point in the history
  12. build(python): Force TIFF to always build locally only for CIBW

    We don't want to locally build TIFF when it already exists; but if we build static TIFF libs locally once, we have to rebuild every time (i.e., for subsequent builds), or else "Deflate::Deflate" is forgotten. This commit forces TIFF to be rebuilt every time, but only for cibuildwheel unix builds. Under normal circumstances, only missing dependencies will be locally built.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    3337f70 View commit details
    Browse the repository at this point in the history
  13. cleanup: fix comment, whitespace

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    50f0b4e View commit details
    Browse the repository at this point in the history
  14. build: pyproject housekeeping

    Update pyproject.toml configuration
    
    The project's TOML file has been updated to reflect changes in the build system, dependencies, and licensing. The scikit-build-core version requirement has been bumped up, and new tools have been added for wheel repair and invocation. The license text has also been simplified to only include Apache-2.0.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    2013d09 View commit details
    Browse the repository at this point in the history
  15. build: slim down wheels w/ refactored CIBW repair-wheel-command step

    The wheel repair command in the pyproject.toml file has been refactored to use an invoke task. he before-build step now also installs invoke. A new tasks.py file has been added with a 'wheel_repair' task that slims down and repairs the wheel file.
    
    Step 1: Remove `lib`, `include`, `share` directories from wheel
    Step 2: Let `repairwheel` fix the wheel with freshly-built libraries found in {build_dir}/lib and {build_dir}/deps/dist/lib.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    7180872 View commit details
    Browse the repository at this point in the history
  16. build: add rye artifacts to gitignore

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    1997724 View commit details
    Browse the repository at this point in the history
  17. build: simplify wheel_edit task

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    80acc8c View commit details
    Browse the repository at this point in the history
  18. cleanup: add copyright and license information to tasks.py

    Also, tiny bit of tidying.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    2ee72cd View commit details
    Browse the repository at this point in the history
  19. build(deps): add zlib build recipe

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    0f5e1a3 View commit details
    Browse the repository at this point in the history
  20. build(deps): add yaml-cpp build recipe

    It's an OCIO dependency.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    13f60ce View commit details
    Browse the repository at this point in the history
  21. build(python): On windows, include Development.Embed Python3 component

    Apparently MSVC is having trouble linking Python3::Python otherwise...
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    b96525e View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    42caf75 View commit details
    Browse the repository at this point in the history
  23. build(wheels): Refine build process and Windows compatibility

    - Lowered the required Python version from 3.9 to 3.7
    - Added numpy as a new dependency
    - Refined DLL loading for Windows in Python 3.8+
    - Adjusted build verbosity settings
    - Moved CMAKE_INSTALL_LIBDIR setting into platform-specific overrides for Linux and macOS only
    - On Windows, do not make adjustments to the INSTALL_RPATH.
    - Reorganized variables in cibuildwheel configuration for better readability
    - Refactored variable names in __init__._call_program function to follow PEP8 guidelines
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    5a70d3e View commit details
    Browse the repository at this point in the history
  24. cleanup(python): formatting for PEP compliance

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    151333f View commit details
    Browse the repository at this point in the history
  25. ci: add wheel workflow

    Stolen nearly line-for-line from OpenColorIO's wheel workflow.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    0810544 View commit details
    Browse the repository at this point in the history
  26. fix(IB): copy/paste error in the ImageBuf iterator copy constructor (A…

    …cademySoftwareFoundation#4365)
    
    Fixes a simple copy/paste error in a copy constructor where the y
    coordinate gets initialised twice instead of y and z.
    
    Signed-off-by: Anton Dukhovnikov <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    antond-weta authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    bf4265e View commit details
    Browse the repository at this point in the history
  27. feat(oiiotool): additional stack commands and --for improvement (Acad…

    …emySoftwareFoundation#4348)
    
    Additional stack manipulation commands:
    * `--popbottom` discards the bottom-of-stack image
    * `--stackreverse` reverses the order of the whole stack
    * `--stackclear` fully empties the stack
    * `--stackextract <index>` moves the indexed item from the stack (index
    0 means the top) to the top.
    
    Make `--for` work correctly in both directions:
    * Correct behavior if `--for` has a negative step value.
    * If the end value is less than the begin value and no step is supplied,
    assume -1 (analogous to how we usually assueme step=1 under ordinary
    circumstances).
    * Error if step is 0 (presume it will make an infinite loop).
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    1c7cd37 View commit details
    Browse the repository at this point in the history
  28. int: Rename env OIIOTOOL_METADATA_HISTORY -> OPENIMAGEIO_METADATA_HIS…

    …TORY (AcademySoftwareFoundation#4368)
    
    It's not just in oiiotool. This seems clearer and adheres to the env
    variable naming convention we chose.
    
    Reminder: This controls whether command line history gets written to
    output image metadata by default by oiiotool and maketx. We historically
    did it, but recently stopped because of security concerns.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    ea63dbb View commit details
    Browse the repository at this point in the history
  29. feat(jpeg): output hint "jpeg:iptc" (AcademySoftwareFoundation#4346)

    JPEG output configuration hint "jpeg:iptc" (default: 1), if set to 0,
    will suppress IPTC block output to the file.
    
    In the process, we changed the return type of utility function
    encode_iptc_iim() to return true if anything was successfully encoded,
    false otherwise.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    781ee80 View commit details
    Browse the repository at this point in the history
  30. fix(png): round dpi resolution to nearest 0.1 (AcademySoftwareFoundat…

    …ion#4347)
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    6eddaf5 View commit details
    Browse the repository at this point in the history
  31. raw: expose additional white balancing hints (AcademySoftwareFoundati…

    …on#4360)
    
    The main purpose of this change is to make it possible to use OIIO for
    reading raw files in rawtoaces instead of calling LibRaw directly. There
    are the changes:
    - add the missing hints needed to implement all combinations of
    white-balancing methods and matrix methods provided by rawtoaces.
    - add the DNG-specific attributes
    
    The change adds this functionality:
    - new "raw:user_black" hint to override the default black point
    - new "raw:use_auto_wb" hint to force LibRaw to white balance by
    averaging over the whole image.
    - new "raw:grey_box" hint to make LibRaw to white balance by averaging
    over the given rectange.
    - new "raw:dng:XXX" attributes added to the output ImageBuf if the input
    image is a DNG file. The attributes consist of 2 sets of [calibration
    illuminant; calibration matrix, XYZ to camera RGB matrix]. Note, the
    current DNG standard supports up to 3 calibration illuminants, but both
    LibRaw and rawtoaces only use 2 currently.
    
    I have manually tested all permutations of white-balancing modes and
    matrix methods which are currently supported by raw to aces. The images
    match up to a rounding error.
    
    The current unit tests pass, but they only seem to use the default
    conversion settings. We may want to extend those. I'm not clear on how
    to do that, there are multiple reference images for different versions
    of LibRaw, not sure if I will have to re-generate all of them. I intend
    to make more changes to the raw plugin soon, may come back to updating
    tests during/after that.
    
    There are currently no tests using DNG files, so the new DNG-specific
    attributes are not covered. The code relying on those in rawtoaces works
    fine.
    
    I have also updated the documentation to add the new hints, however, I
    haven't been able to build the documentation.
    
    Signed-off-by: Anton Dukhovnikov <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    antond-weta authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    5ca303d View commit details
    Browse the repository at this point in the history
  32. api: move OIIO::pvt::error and log_time into the exposed OIIO namespa…

    …ce (AcademySoftwareFoundation#4362)
    
    This is needed for the related OpenCV-related PR
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    3599081 View commit details
    Browse the repository at this point in the history
  33. admin: Relicense code under Apache 2.0 (AcademySoftwareFoundation#3905)

    Some more updates to the relicensing. At this point, less than 0.15% of the codebase remains under the original BSD-3-clause license.
    
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    2db7b90 View commit details
    Browse the repository at this point in the history
  34. api: add pvt::heapsize() and pvt::footprint() methods and image cache…

    … memory tracking (AcademySoftwareFoundation#4322)
    
    First PR of two, following @lgritz and I discussions on memory tracking
    in the OIIO::ImageCache.
    - Add two template methods and their specializations for types various
    to help memory tracking:
    ```c++
    // return the total heap allocated memory held by the object and its members
    template<typename T> inline size_t heapsize(const T& t);
    // return the total memory footprint including the size of the structure itself
    template<typename T> inline size_t footprint(const T& t);
    ```
    - Specialized for: ParamValue, ParamValueList, ImageSpec, ImageInput,
    ImageOutput, std::vector, std::shared_ptr, std::unique_ptr,
    oiio::intrusive_ptr, ImageCacheImpl related objects.
    - New files:
    - `include/memory.h` : adds base and few types specialization of
    heapsize and footprint.
    - `libtexture/imagecache_memory_pvt.h` : adds specilializations for
    ImageCacheImpl and related objects.
    - `libtexture/imagecache_memory_print.h` : adds a helper function that
    print a breakdown of the ImageCacheImpl total memory usage as well, as
    well as per image format. Note: this is slow, but gives accurate memory
    estimation.
    
    Related PR from Larry :
    AcademySoftwareFoundation#4317
    
    Signed-off-by: Basile Fraboni <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    bfraboni authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    2c10095 View commit details
    Browse the repository at this point in the history
  35. deps: Make OCIO 2.2+ a required dependency (AcademySoftwareFoundation…

    …#4367)
    
    Make OCIO a hard dependency, at least version 2.2.
    
    Revise and improve the OCIO "auto-build" scripts.
    
    Remove OCIO 1.x testsuite reference output.
    
    No longer need FindOpenColorIO.cmake module
    
    As part of this, I split the CI "oldest/hobbled" test into two different
    tests:
    
    * oldest -- test against the oldest supported versions of all
    dependencies.
    * hobbled -- test against most optional dependencies missing and
    optional features disabled.
    
    ---------
    
    Signed-off-by: Larry Gritz <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    a7c8fd8 View commit details
    Browse the repository at this point in the history
  36. fix(oiiotool): -i:ch=... didn't fix up alpha and z channels (Academ…

    …ySoftwareFoundation#4373)
    
    Fix a bug in oiiotool wherein `-i:ch=...` (input only a subset of
    channels when reading from a file) was not adjusting the spec's
    alpha_channel and z_channel -- that is, they still contained the OLD
    channel numbers of those things, which not only could be wrong due to
    the reordering, but they might be out of range of the new number of
    channels.
    
    Also a related fix in the TIFF reader, to fix a possible dereference of
    an empty vector. This was being triggered by that out-of-range
    alpha_channel. Maybe that can't happen anymore with the above bug fix,
    but it still feels like the safer way to proceed.
    
    This was all found by the sanitizers in CI -- and only recently, despite
    this code having this bug for a long time. So yay for sanitizer CI!
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    c4b6bb0 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    25df0aa View commit details
    Browse the repository at this point in the history
  38. build: CI sanitizer test improvements (AcademySoftwareFoundation#4374)

    CI sanitizers in master have been failing lately. A different PR
    addresses the root cause, but this patch contains some improvements I
    made along the way while investigating it:
    
    * CMake: Change the SANIIZE build variables to use set_cache, thus
    allowing easier override by env variable.
    
    * Bumped the CI sanitizer test to use the 2024 container and latest
    compilers.
    
    * Suppress UB warnings in STL function.h, where it's claiming undefined
    behavior in the std::function guts called by ArgParse internals. Only
    seen failing on my Mac, wasn't actually failing in the GHA CI. I'm
    pretty sure it's a false positive.
    
    * Also, only on my Mac building against OpenVDB 11, it found some UB in
    OpenVDB, which I'm suppressing (I think it's also false positive).
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    a1d809b View commit details
    Browse the repository at this point in the history
  39. build(deps): Raise libheif minimum to 1.11 (AcademySoftwareFoundation…

    …#4380)
    
    This version dates from early 2021 (so still supporting back 3.5 years).
    
    The reason for the bump is to simplify a bit on our part and avoid older
    versions known to be broken or lacking certain features.
    
    This is for master/2.6/3.0 only, will not be backported to 2.5, since we
    never raise minimum dependencies in already-released branches.
    
    ---------
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    1f45b2f View commit details
    Browse the repository at this point in the history
  40. fix(windows): fix for setenv() on Windows (AcademySoftwareFoundation#…

    …4381)
    
    Microsoft's runtime library doesn't support the standard setenv()
    function. _putenv_s() should be used instead.
    
    Without fix iv do not compiling:
    `E:\GH\OpenImageIO\src\iv\ivmain.cpp(119,9): error C3861: 'setenv':
    identifier not found [E:\GH\OpenImageIO\build\src\iv\iv.vcxproj]`
    
    ---------
    
    Signed-off-by: Vlad (Kuzmin) Erium <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    ssh4net authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    becb6e8 View commit details
    Browse the repository at this point in the history
  41. build: Don't link libOpenImageIO against OpenCV (AcademySoftwareFound…

    …ation#4363)
    
    Fully linking OpenCV against libOpenImageIO is burdensome for people
    downstream, especially those who want a static version of
    libOpenImageIO.
    
    There were only three IBA functions that use OpenCV: to_OpenCV(),
    from_OpenCV(), and capture_image(), and all three are fairly short. Move
    them to a separate header, imagebufalgo_opencv.h, make them fully INLINE
    (so they don't actually produce object code in libOpenImageIO, which
    therefore does not need to link against OpenCV).
    
    Applications wanting these three functions should include this header
    and will be responsible themselves for ensuring that the include paths
    and linkage of their application makes provisions for finding and using
    OpenCV. All other applications don't need to deal with OpenCV dependency
    at all.
    
    Our own oiiotool (for --capture) and our python bindings still link
    against OpenCV to support this functionality (again, still as an
    optional dependency, enabled only if OpenCV is found at build time). But
    downstream apps using libOpenImageIO and who do not themselves need our
    OpenCV functioality now no longer need to link against OpenCV.
    
    We have removed capture_image() from the Python bindings -- Python
    scripts that need to capture live camera images can use OpenCV or any
    other capture API of their choice without going through OIIO.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    0eedbcb View commit details
    Browse the repository at this point in the history
  42. api: use shared_ptr for ImageCache and TextureSystem (AcademySoftware…

    …Foundation#4377)
    
    Change IC::create() and TS::create() to return shared_ptr instead of a
    raw pointer. This cleans up a lot of lingering lifetime management issue
    of these classes. The switch to 3.0 is an opportunity to make breaking
    changes to these APIs.
    
    For the sake of downstream users, we define preprocessor symbols
    OIIO_IMAGECACHE_CREATE_SHARED and OIIO_TEXTURESYSTEM_CREATE_SHARED to
    signal that the new APIs are present. Some very minor changes may be
    needed at the call site.
    
    ---------
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    ef615c8 View commit details
    Browse the repository at this point in the history
  43. Bump version to indicate ABI changes

    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    87d2e70 View commit details
    Browse the repository at this point in the history
  44. ci: Bump ABI standard in master

    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    3122823 View commit details
    Browse the repository at this point in the history
  45. cleanup: Fix typo where apostrophe was used for possessive of 'it' (A…

    …cademySoftwareFoundation#4383)
    
    Nominally, fix four places where "it's" was used when "its" was
    appropriate. Realistically, force the EasyCLA dialog so that I can get
    an individual CLA in place, my employment with ARRI having terminated on
    15 July of this year.
    
    Signed-off-by: Joseph Goldstone <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    JGoldstone authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    ce0b5b8 View commit details
    Browse the repository at this point in the history
  46. style: Turn on clang-format for ivmain.cpp (AcademySoftwareFoundation…

    …#4382)
    
    It was disabled to make prettier formatting for getargs, but neglected
    to turn it back on for the rest of the file.
    
    I also changed a few old `<<` stream output to `print()`.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    660d068 View commit details
    Browse the repository at this point in the history
  47. int: Beef up some error messages (AcademySoftwareFoundation#4369)

    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    9db71c5 View commit details
    Browse the repository at this point in the history
  48. docs: typo fix (AcademySoftwareFoundation#4385)

    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    bd12ec9 View commit details
    Browse the repository at this point in the history
  49. fix: Catch potential OCIO exception that we were missing (AcademySoft…

    …wareFoundation#4379)
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    1a0adf6 View commit details
    Browse the repository at this point in the history
  50. ptex: Store full metadata only at subimage 0, miplevel 0 for ptex fil…

    …es. (AcademySoftwareFoundation#4376)
    
    Don't read or store full metadata on every MIP level for every face.
    That can really add up! Ptex can only have one set of metadata, the
    format itself doesn't allow it to vary from face to face.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    f27f092 View commit details
    Browse the repository at this point in the history
  51. fix(png): bug in associateAlpha botched alpha=0 pixels (AcademySoftwa…

    …reFoundation#4386)
    
    In trying to avoid doing the color conversion pointlessly for pixels
    with alpha=0, I accidentally also managed to skip the multiplication by
    alpha for those pixels. Oops.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    cad150d View commit details
    Browse the repository at this point in the history
  52. feat(iba): IBA::demosaic() for bayer pattern demosaicing (AcademySoft…

    …wareFoundation#4366)
    
    Added IBA::demosaic().
    Currently supports 4 Bayer pattern layouts, "RGGB", "GRBG", "GBRG", "BGGR", and 2 algorithms: "linear", "MHC".
    Should be expandable in the future.
    
    ---------
    
    Signed-off-by: Anton Dukhovnikov <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    antond-weta authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    d8ad61f View commit details
    Browse the repository at this point in the history
  53. build: Add proper detection of new FFmpeg versions (AcademySoftwareFo…

    …undation#4394)
    
    Correctly detect new versions of FFmpeg (6.1 and 7.0). The FFmpeg versions page
    was used for reference:
    https://www.ffmpeg.org/download.html#releases
    
    Signed-off-by: Darby Johnston <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    darbyjohnston authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    14f7bb0 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    066e571 View commit details
    Browse the repository at this point in the history
  55. fix(iba): Add missing version of warp (AcademySoftwareFoundation#4390)

    It was documented and declared, but implementation was missing in
    action.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    8289357 View commit details
    Browse the repository at this point in the history
  56. feat(ffmpeg): FFmpeg additional metadata (AcademySoftwareFoundation#4396

    )
    
    This change adds additional FFmpeg metadata from the video and data
    streams. These streams can hold the start timecode which is very useful
    in OpenTimelineIO applications.
    
    I also added `av_guess_frame_rate()` which might be more robust than
    just checking `stream->avg_frame_rate`, but I can also create a separate
    PR if it is better to break it up.
    
    It doesn't look like there are any FFmpeg tests in `testsuite`?
    
    I tested with the DPEL ALab trailer and some Netflix Open Content
    movies, and was able to see the timecode metadata in the OIIO image
    attributes.
    
    ---------
    
    Signed-off-by: Darby Johnston <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    darbyjohnston authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    087605a View commit details
    Browse the repository at this point in the history
  57. fix(iba): IBA::transpose() didn't set output image's format to input (A…

    …cademySoftwareFoundation#4391)
    
    Because IBA::transpose changes resolution, it doesn't pass the input
    image to IBAPrep(), and there was a special case there that always set
    destination to float if there were no source images.
    
    So change transpose to specifically request a format, to be the same as
    the input image.
    
    And that required a tweak to IBAPrep allowing us to specify such a thing
    (there was already an option that meant "force it to float", but not the
    general case of an arbitrary type).
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    9e5d1e5 View commit details
    Browse the repository at this point in the history
  58. dev: span utility improvements (AcademySoftwareFoundation#4398)

    * Added as_bytes and as_writable_bytes that convert spans of arbitrary
    type to spans of std::byte. (This mimics C++20 utilities of the same
    name.)
    
    * spancopy, spanset, spanzero: add parameter defaults for the common
    case of wanting to do the operation on the whole span, also simplify the
    bound-limiting logic in those functions a bit (but still performing
    precisely the same task).
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    acb513a View commit details
    Browse the repository at this point in the history
  59. feat(raw): make the crop match in-camera JPEG (AcademySoftwareFoundat…

    …ion#4397)
    
    Make the 'display window' match the default crop, which is applied to
    in-camera JPEG.
    
    ---------
    
    Signed-off-by: Anton Dukhovnikov <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    antond-weta authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    f784415 View commit details
    Browse the repository at this point in the history
  60. api!: add virtual heapsize() and footprint() to ImageInput and ImageO…

    …utput (AcademySoftwareFoundation#4323)
    
    Second PR of two, following @lgritz and I discussions on memory tracking
    in the OIIO::ImageCache.
    
    - the memory tracking system from
    AcademySoftwareFoundation#4322 is
    not sufficient to track OIIO public objects that can be overriden.
    - add virtual `heapsize()` method to ImageInput and ImageOutput that
    return the total heap allocated memory held by the structure and its
    members.
    - [ ] **TODO**: override for every internal OIIO type (bmp, tiff, etc). 
    
    Related PR from Larry :
    AcademySoftwareFoundation#4317
    First PR:
    AcademySoftwareFoundation#4322
    
    Signed-off-by: Basile Fraboni <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    bfraboni authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    22dfb86 View commit details
    Browse the repository at this point in the history
  61. refactor!: de-virtualize IC and TS (AcademySoftwareFoundation#4384)

    Background: The ImageCache and TextureSystem had historically been
    implemented as pure virtual abstract base classe defining an interface,
    then a hidden concrete subclass. The flexibility this was intended to
    provide was never really used; instead the imagined main client for the
    flexibility, OSL, has a different mechanism for customizing the texture
    system (via their RendererServices class). Meanwhile, this has made the
    interfaces to IC and TS impossible to change without breaking the ABI.
    
    So this PR does the following:
    
    * ImageCache and TextureSytem are fullly de-virtualized, and are now
    concrete classes, no hidden subclassing, no virtual methods. As such,
    removing or changing existing methods will be an ABI break, but adding
    new methods is not.
    
    * Each now use a PIMPL idiom, where all the data and internal methods
    are hidden from the public interface and do not affect the ABI.
    
    * Roughly speaking, we added the PIMPL pointers and made the
    ImageCacheImpl/TextureSystemImpl -- what used to be the hidden concrete
    subclasses -- into the hidden PIMPL classes.
    
    * Moved a lot of classes that used to be in a "pvt" namespace into the
    main namespace. If they are opaque types not exposed in public headers
    or as symbols exported from the library, it doesn't matter, so this just
    removes some arbitrary clutter.
    
    * Had to rearrange some of the recently added heapsize/footprint code,
    moved some inline functions in the headers into methods of the classes,
    defined in the cpp files.
    
    This itself is a huge ABI change, so will only be merged into master, to
    become part of the 3.0 release. This is not an API change, though! This
    is all about the internals, and should not require any client software
    to change a single line of code.
    
    I may do further simplification or refactoring of this code in the
    future, but that will all be smaller and have no further API/ABI changes
    that break compatibility.
    
    Although the structure of the class hierarchy has changed around, none
    of the logic about how IC and TS actually *work* has changed, so there
    should be no change in observable behavior.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    1c3370e View commit details
    Browse the repository at this point in the history
  62. feat: implement support for OCIO NamedTransforms (AcademySoftwareFoun…

    …dation#4393)
    
    - ColorProcCacheKey: Update definition, signature, and usage to support
    caching NamedTransform processor handles.
    (Note: **ABI-breaking**)
    
    - ColorConfig: add NamedTransform convenience functions:
    `getNumNamedTransforms`, `getNamedTransformNameByIndex`,
    `getNamedTransformNames`, `getNamedTransformAliases`
    
    - ColorConfig: add `createNamedTransform` function returning new
    ColorProcessorHandle
    
    - Add `ImageBufAlgo::ocionamedtransform` functions
    
    - oiiotool: add `--ocionamedtransform` operator
    
    - python: add NamedTransform convenience function bindings
    
    - python: add `ImageBufAlgo.ocionamedtransform(...)` bindings
    
    - Update `oiiotool` and `python` documentation with examples
    
    
    ## Description
    
    OCIO-2 config authors may define a set of stand-alone "source-agnostic"
    `NamedTransforms`. Unlike the `colorconvert`, `ociodisplay`, and
    `ociolook` IBAs, which explicitly convert _from_ a color space to
    something else, the `ocionamedtransform` IBA behaves more like the
    `ociofiletransform` IBA, where the transform itself can be applied
    either in the forwards or inverse direction, and does not take into
    consideration the input encoding or image state.
    
    Quoting from the OCIO [NamedTransform
    documentation](https://opencolorio.readthedocs.io/en/latest/guides/authoring/authoring.html#named-transforms):
    
    > Sometimes it is helpful to include one or more transforms in a config
    that are essentially stand-alone transforms that do not have a fixed
    relationship to a reference space or a process space. An example would
    be a “utility curve” transform where the intent is to simply apply a
    LUT1D without any conversion to a reference space. In these cases, a
    named_transforms section may be added to the config with one or more
    named transforms. [...] This feature may be used to emulate older
    methods of color management that ignored the RGB primaries and simply
    applied one-dimensional transformations.
    
    Notably, the built-in OCIO-2 Studio config
    (`ocio://studio-config-latest`) contains NamedTransforms "sRGB - Curve"
    and "Rec709 - Curve", which we could implement as drop-in replacements
    for the existing `linear_to_sRGB`, `sRGB_to_linear`, `linear_to_Rec709`,
    and `Rec709_to_linear` functions in `color.h` (unless those functions
    are deprecated...).
    
    There are several other applications for NamedTransforms as well. They
    can be extremely useful as workflow-oriented transforms implemented at
    various points in facility pipelines (e.g., for applying shot-specific
    conversions, grades, gamut-compression, etc.); they can be used to
    provide diagnostic transforms for visualizing "exposure zones", clipped
    areas, NaNs, etc; for visually "tagging" problematic clips; for applying
    parts of ACES Metadata Files parsed by OCIO's forthcoming AMF parser;
    for conversion to non-RGB color models... all sorts of things.
    
    ## Tests
    
    Tests are forthcoming. I've tested everything locally, but have not yet
    implemented proper tests in the testsuite.
    
    ---------
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    9818a04 View commit details
    Browse the repository at this point in the history
  63. fix: Don't let fmtlib exceptions crash the app (AcademySoftwareFounda…

    …tion#4400)
    
    When fmt arguments don't match the format string, fmt will throw an
    exception, or terminate if we disable exceptions (which we do). For
    gcc11+, we tried intercepting these, but let's do it for all platforms,
    and let's not terminate ourselves, but insted print and log the error.
    
    But, oof, to do this properly, I needed to move some error recording
    functionality from libOpenImageIO to libOpenImageIO_Util and make it
    owned more properly by strutil.cpp, so that this all works even when
    only using the util library. The logic isn't changing, it's just moving
    over to the other library.
    
    This all helps to address AcademySoftwareFoundation#4388
    
    Unfortunately, the exception thrown by fmt doesn't tell us the bad
    format string itself. That would have really allowed to probably zero
    right in on it. But at least we know it's occurring, and one could put a
    breakpoint on pvt::log_fmt_error to catch it in the act and see where
    it's being called, revealing the bad line.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    6384b5d View commit details
    Browse the repository at this point in the history
  64. CHANGES and bump version to 2.6.5.0

    * Bump version to reflect recent ABI changes
    * Bring CHANGES and CREDITS up to date
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    11e84e6 View commit details
    Browse the repository at this point in the history
  65. Update ABI reference commit / stage for developer preview v2.6.5.0

    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    e1fc73f View commit details
    Browse the repository at this point in the history
  66. Bump version after developer preview tag

    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    e19ab97 View commit details
    Browse the repository at this point in the history
  67. docs: Switch license name in docs (AcademySoftwareFoundation#4407)

    The link points to the Apache 2.0 license, we just never changed the
    label here.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    a8362ad View commit details
    Browse the repository at this point in the history
  68. api: Fold span_util.h contents into span.h (AcademySoftwareFoundation…

    …#4402)
    
    span_util.h is relatively new. I'm honestly no longer sure why I thought
    it was necessary to make a second file, but so little is in it that I
    now believe its contents should be folded into span.h to keep all the
    span-related definitions in once place. It's just not big enough to need
    to be divided into several headers.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    be9027f View commit details
    Browse the repository at this point in the history
  69. api(IB): Add span-based constuctors to ImageBuf (AcademySoftwareFound…

    …ation#4401)
    
    The flavor of ImageBuf that wraps caller-owned memory is constructed or
    reset by merely passing a raw pointer and it assumes that the range of
    memory implied by the strides is entirely safe to read from or write to.
    And even if correct, there is not much within ImageBuf internals to
    prevent bugs from buffer overruns.
    
    This PR introduces a new constructor and reset() method to ImageBuf
    where instead of taking a raw pointer, it takes a span describing the
    extent of the safely addressible memory (and also an optional "pointer
    to first pixel" within the buffer, which is necessary if you're using
    negative strides or for some other reason are describing safe memory
    that starts before the location of pixel 0). That span is stored in the
    ImageBuf, and also it remembers if it was a cspan (which should indicate
    a read-only IB) or a non-const span (which should wrap writable memory).
    
    At this moment, I'm just adding this API and will start using and
    documenting it as the perferred method, with the raw pointer versions
    being regarded as unsafe for now (and maybe some day will be
    deprecated?). But we're not yet using the span internally for safety
    checks.
    
    In the future, my intent is to gradually add safeguards to do bounds
    checking against the span for IB operations that touch the wrapped
    memory. Because we'll most likely bounds check only in debug mode, it
    shouldn't ever impact performance, but it will make debugging,
    sanitizer, and fuzz tests more robust to catch and zero in on buffer
    overruns. I also like how it forces the caller, at the call site, to
    think hard about exactly what range of memory the IB is wrapping, and
    not merely pass a single pointer and hope it works out.
    
    I also changed all ImageBuf ctrs and resets within the OIIO codebase to
    use the new span-based versions.
    
    This is part of an overall trend to migrate from raw pointer based API
    calls to span-based API design as much as possible.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    1ddddd8 View commit details
    Browse the repository at this point in the history
  70. ci: Bump the dependency versions for the 'latest' test to the actual …

    …latest (AcademySoftwareFoundation#4410)
    
    Also some other minor simplifications.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    f4f5ee8 View commit details
    Browse the repository at this point in the history
  71. ci: add a workflow that builds docs (AcademySoftwareFoundation#4413)

    This allows somebody who is enhancing the docs to check the results
    entirely through CI without having to set up the dependencies necessary
    for docs on their end. (Perfect for Dev Days.) It also ensures that any
    changes we make to the code base don't break the documentation somehow,
    because now a successful docs build will be part of the CI.
    
    Note that the docs building job leaves behind an artifact, which will be
    a zip file of the directly containing the HTML docs, just like one would
    find on RTD, so you can download that zip file and view the docs it made
    to verify that everything looks right.
    
    I made the docs builder a separate workflow, but I also changed some
    things in the CI workflow for the sake of making them more similar.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    9e40cb0 View commit details
    Browse the repository at this point in the history
  72. ci: adjust wheel cron and add workflow_dispatch

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    36c5275 View commit details
    Browse the repository at this point in the history
  73. Configuration menu
    Copy the full SHA
    5397de1 View commit details
    Browse the repository at this point in the history
  74. ci(wheel): Updated deployment target for MacOS

    Set MACOSX_DEPLOYMENT_TARGET = 10.15 so builds stop screaming about C++17’s std::filesystem API features not being available
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    68c5497 View commit details
    Browse the repository at this point in the history
  75. fix(python): updated PYTHON_SITE_DIR setting for skbuild

    Had previously commented out, to see if it was aversely affecting the windows builds... but I think it's actually causing the module not to be packaged in the wheel at all!
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    e3f07e1 View commit details
    Browse the repository at this point in the history
  76. fix(python): For macOS, ensure dependencies are built for the correct…

    … architectures.
    
    Also add clarifying comments to pyproject.toml
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    c18d241 View commit details
    Browse the repository at this point in the history
  77. Configuration menu
    Copy the full SHA
    d85dfc8 View commit details
    Browse the repository at this point in the history
  78. ci(wheels): temporarily use "Release" instead of "MinSizeRel" bld type

    I'd like to see how much larger the build artifacts are, and test to see if windows has any less trouble.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    d719823 View commit details
    Browse the repository at this point in the history
  79. docs: Convert more examples within the imagebufalgo chapter. (Academy…

    …SoftwareFoundation#4039)
    
    Convert C++ and Python examples from the "Image transformations and data
    movement" section of the "imagebufalgo" chapter into tests within the
    "docs-examples" testsuites (related to issue AcademySoftwareFoundation#3992).
    
    Update 'oiiotool' tabs to use a simple 'tab' instead of 'code-tab' to
    prevent synchronized tab selection, which is inconsistent with the other
    tabs using the 'literalinclude' directive.
    
    
    ---------
    
    Signed-off-by: Jeremy Retailleau <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    buddly27 authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    0505040 View commit details
    Browse the repository at this point in the history
  80. test: Fix tests that were writing into ref (AcademySoftwareFoundation…

    …#4418)
    
    openexr_copy and openexr-decreasingy
    
    These recently added test were writing into the ref/ directory, which
    they certainly should not do. Write into the build test area, compare to
    what's in the ref area.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    318e4ff View commit details
    Browse the repository at this point in the history
  81. fix(deps): Turn off building shared libs for libdeflate; refind zlib

    More attempts to fix windows wheel builds...
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    4c91126 View commit details
    Browse the repository at this point in the history
  82. fix(deps): Don't try to refind a config for ZLIB

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    4ef5553 View commit details
    Browse the repository at this point in the history
  83. Configuration menu
    Copy the full SHA
    edff8a6 View commit details
    Browse the repository at this point in the history
  84. cleanup: add and clarify pyproject.toml comments

    Also removed superfluous settings.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    245c51e View commit details
    Browse the repository at this point in the history
  85. ci: prepare Wheels workflow for PR

    * Limit to commits pushed to AcademySoftwareFoundation/OpenImageIO, tagged as v2.6.* or v3.*
    * Uncomment "upload_pypi" step. (NB: requires setting a secret named `PYPI_API_TOKEN`)
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    e52c3cf View commit details
    Browse the repository at this point in the history
  86. ci(wheels): use "oiiotool --help" as a test command.

    Add a new test command in the pyproject.toml cibw options. This command runs after wheels are built with `cibuildwheel`, and checks if CLI Python scripts can import the OpenImageIO module, invoke CLI binary executables, and load all shared libraries. It uses 'oiiotool --help' to output a list of dependencies with which OIIO was compiled. If this works, everything else should check out too (pending CI workflow results)...
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    6d25552 View commit details
    Browse the repository at this point in the history
  87. ci(wheels): Use new pypi "trusted publisher" workflow

    No PYPI_API_TOKEN secret needed -- see https://docs.pypi.org/trusted-publishers/using-a-publisher/
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    16793db View commit details
    Browse the repository at this point in the history
  88. Configuration menu
    Copy the full SHA
    edda093 View commit details
    Browse the repository at this point in the history
  89. Merge branch 'master' into python_cibuildwheels

    Signed-off-by: zachlewis <[email protected]>
    zachlewis authored Sep 16, 2024
    Configuration menu
    Copy the full SHA
    f465ba5 View commit details
    Browse the repository at this point in the history
  90. ci(wheels): Build macos arm64 wheels on macos arm64 runners

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    d0adf3a View commit details
    Browse the repository at this point in the history
  91. deps: add build recipe for PNG

    Apparently the macos-14 github runners ship with PNG-1.4, which is too old; the build system notes this, but tries to link the system PNG regardless.
    This recipe will hopefully inspire the runner to build and use PNG-1.6+
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    d6872e5 View commit details
    Browse the repository at this point in the history
  92. deps(PNG): always build static PNG

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    5904090 View commit details
    Browse the repository at this point in the history
  93. deps(PNG): Always build with -fPIC

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    3cbb73d View commit details
    Browse the repository at this point in the history
  94. deps(PNG): Always build shared libs

    Trying to get to the bottom of why OIIO is continuing to link system shared system PNG (CI images) instead of freshly-built static libs. Presumably, if I build shared PNG libs, OIIO will prefer the newer ones over the system libraries.
    (Which I guess would mean any found dynamic libraries are preferred over any found static libraries...)
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    0fdace1 View commit details
    Browse the repository at this point in the history
  95. deps(PNG): adjust libpng library install dir

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    0160971 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2024

  1. deps(PNG): disable Framework build for libpng

    *This* seems to be the key we were looking for...
    
    Also, it looks like libpng 1.6.44 (released less than a week ago) generates a proper CMake config, so prefer that if it's available....
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    35210f1 View commit details
    Browse the repository at this point in the history
  2. ci(wheels): Use newer macos x86_64 runners, and refine publish condition

    Turns out the macos-12 runners are deprecated.
    Also, the publish step should only occur when pushing a tag that starts with v2.6 or v3.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    889e46d View commit details
    Browse the repository at this point in the history
  3. deps(yaml-cpp): specify that yaml-cpp is a dependency of OCIO

    I'm not sure if this actually affects anything, since OCIO is a required dependency of OIIO; but if OCIO doesn't need to be built, then neither does yaml-cpp.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    f5e118d View commit details
    Browse the repository at this point in the history
  4. cleanup: Minor adjustments to pyproject.toml

    - Add support for Python 3.13
    - Update minimum required Python version from 3.7 to 3.8
     (Need to further investigate CIBW troubles with python 3.7)
    - Upgrade scikit-build-core dependency to >=0.10.6,<1 (up from 0.10)
    - Add oldest-supported-numpy as a new build dependency. I don't think numpy is actually needed at build time, but this seems to help certain builds not have to compile numpy from source.
    - Skip 32-bit builds in cibuildwheel configuration
    - Enable free-threaded support for Python 3.13
    - Adjust manylinux and musllinux images versions in cibuildwheel configuration for local testing -- these are currently overridden by environment variables set in the Wheels github workflow.
    Specifically, use the manylinux2014 (i.e., CentOS-7) image for python 3.7 and 3.8; and use manylinux_2_28 (Rocky) for the rest.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    16d634e View commit details
    Browse the repository at this point in the history
  5. fix(wheels): disable free-threaded support for now

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    ce5db05 View commit details
    Browse the repository at this point in the history
  6. ci(wheel): revert CIBW environment override

    it was screwing everything up.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    ab7e348 View commit details
    Browse the repository at this point in the history
  7. deps(PNG): Always disable shared libs

    ...to see if this fixes a problem with building on Windows.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    ffa522e View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2024

  1. ci(wheels): Use macos-14 runners for linux arm builds; use latest cibw

    The aarch64 wheels are currently failing , and they take forever to build. Moving the aarch64 wheels builds to the MacOS M1 runners will hopefully fix both problems at once, provided these mac runners have a docker engine installed...
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    1258db1 View commit details
    Browse the repository at this point in the history
  2. ci(wheels): refine process for building Linux aarch64 wheels

    Create a separate job just for building aarch64 wheels. Another attempt to get the wheels cross-compiled on the apple silicon runners.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    5dc9ceb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2a5e713 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    59787c2 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2024

  1. Configuration menu
    Copy the full SHA
    72402d2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c313ad3 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. deps: Remove yaml-cpp and PNG recipes

    We have separate PRs in for dealing with PNG and yaml-cpp deps. Removing the recipes from this PR to simplify things, and to check my previous assertion that are needed for the wheels github workflow.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    36a4d29 View commit details
    Browse the repository at this point in the history
  2. ci(wheels): Add CPython 3.13, and improve linux ARM builds

    * Create a dedicated job for linux-arm builds. They take substantially longer than the x86_64 builds, because the aarch64 architecture is being emulated. Ideally, we want to build these wheels on ARM runners, which should be widely available in a few months.
    
    * Disable tests for Linux ARM wheels. Apparently, the tests are failing, I think due to trouble CIBW has with testing ARM wheels from x86_64 runners. I've checked the builds myself on my local machine (Rocky and Alma aarch64 docker containers running on a M1 Mac), and they seem totally fine. We'll have to re-enable when we switch to ARM runners.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    f21a834 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'main' into python_cibuildwheels

    Signed-off-by: zachlewis <[email protected]>
    zachlewis authored Sep 23, 2024
    Configuration menu
    Copy the full SHA
    18d192f View commit details
    Browse the repository at this point in the history
  4. cleanup: reconcile minor differences with main branch

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    fb677f4 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. ci(wheels): Use homebrew to install libpng on MacOS ARM runners

    Until we can figure out a better solution, having homebrew install libpng will work around the issue with Wheels checks failing due to trying to link the too-old version of PNG installed to the macos-14 gh runners
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    37fbfa3 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2024

  1. Configuration menu
    Copy the full SHA
    25a6ed7 View commit details
    Browse the repository at this point in the history
  2. ci(wheels): install python 3.8 to macos-14 runners

    This should fix failing cp38-macos-arm64 builds.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    e9e3197 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d214039 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2024

  1. cleanup(wheels): make tasks.py a little prettier

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    77b7436 View commit details
    Browse the repository at this point in the history
  2. deps(libdeflate): revert changes to build recipe

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    25d774c View commit details
    Browse the repository at this point in the history
  3. Revert "deps(libdeflate): revert changes to build recipe"

    This reverts commit 25d774c.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    7e9e687 View commit details
    Browse the repository at this point in the history
  4. fix: test python-colorconfig with the same config for all OCIO vers

    Previously, the python-colorconfig tests used the "ocio://default" OCIO config, which varies across minor versions of OCIO. This caused our CI "Bleeding Edge" checks to fail whenever the OpenColorIO project updated the default builtin config in their "main" branch.
    
    This commit forces the tests to use the `cg-config-v1.0.0_aces-v1.3_ocio-v2.1` builtin config that ships with all versions of OCIO-2.2+.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    e45ca15 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2024

  1. Configuration menu
    Copy the full SHA
    5f76706 View commit details
    Browse the repository at this point in the history
  2. ci(wheels): remove unnecessary QEMU setup

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    c6c25a4 View commit details
    Browse the repository at this point in the history
  3. fix: typo in pyproject build requires

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    3a3deee View commit details
    Browse the repository at this point in the history
  4. Revert "fix: test python-colorconfig with the same config for all OCI…

    …O vers"
    
    This reverts commit e45ca15.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    1e05f5d View commit details
    Browse the repository at this point in the history
  5. fix: adjust numpy build requirement

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    e6f818b View commit details
    Browse the repository at this point in the history
  6. testing: temporarily disable numpy build requirement

    Is numpy even needed at build-time, or does pybind11 provide everything needed for the build?
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    5f4caf5 View commit details
    Browse the repository at this point in the history
  7. ci(wheels): Disable py3.8 builds

    Apparently, there are no numpy-2 bdists for python3.8 available on pypi...
    
    also:
    Revert "testing: temporarily disable numpy build requirement"
    This reverts commit 5f4caf5.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    6b2fb9f View commit details
    Browse the repository at this point in the history
  8. fix: tiny update to .gitignore

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    af99af9 View commit details
    Browse the repository at this point in the history
  9. fix: Reenable Python-3 module when using cmake < 3.18

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    bf451a5 View commit details
    Browse the repository at this point in the history
  10. ci(wheels): macos_x86: disable WebP, HEIF plugin, use macos-13 runner

    Trying to prevent x265 (GPL) dynamic libraries from getting included.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    b2a1e4d View commit details
    Browse the repository at this point in the history
  11. ci(wheels): macos-x86_64: revert to macos-12 runners

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    31cc8f0 View commit details
    Browse the repository at this point in the history
  12. deps(TIFF): turn off support for WebP compression

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    9f6aedf View commit details
    Browse the repository at this point in the history
  13. testing: Update test ref output for OpenColorIO 2.4 (AcademySoftwareF…

    …oundation#4459)
    
    This fixes OIIO's CI "bleeding edge" test that broke when OCIO pushed
    to their main the new config files that will be in OCIO 2.4. (Yay!)
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    130a108 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3903ef2 View commit details
    Browse the repository at this point in the history
  15. fix(wheels): macOS: build _all_ deps locally

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    a0af477 View commit details
    Browse the repository at this point in the history
  16. ci(wheels): MacOS: brew uninstall freetype

    On the macos runners, the static freetype library is linked against a x86_64 PNG lib.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    35b4af6 View commit details
    Browse the repository at this point in the history
  17. ci(wheels): MacOS x86_64: reenable WebP

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    bfae087 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    77fcc6b View commit details
    Browse the repository at this point in the history
  19. ci: Remove old MacOS-12 CI test

    It's an old flavor not well supported by homebrew any longer, so
    what's happening is that most of the dependency packages we ask to
    install have to build from source, which means it takes a long long
    time. Just get rid of it, we have two other Mac test cases -- a newer
    MacOS 13 Intel one, and a MacOS 14 ARM one. That's enough coverage.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    a615763 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. Don't exclude MacOS 12, just disable OpenCV and Qt homebrew install f…

    …or it
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    b13a055 View commit details
    Browse the repository at this point in the history
  2. ci: Streamline the old MacOS-12 CI test (AcademySoftwareFoundation#4465)

    It's an old flavor not well supported by homebrew any longer, so what's
    happening is that some of the dependency packages we ask to install have
    to build from source, which means it takes a long long time.
    
    By disabling OpenCV and Qt homebrew installation for it, we can make it
    fast again. Neither the minimal OpenCV interop, nor osltoy (the only
    thing that needs Qt) are exercised by the automated testsuite anyway, so
    I don't think there's any loss of testing functionality in practice.
    
    Signed-off-by: Larry Gritz <[email protected]>
    lgritz authored and zachlewis committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    b4b1269 View commit details
    Browse the repository at this point in the history
  3. ci: Test against OpenEXR 3.3 and deal with its 4.0 bump

    OpenEXR 3.3 was just released and its main branch has bumped its
    advertised version to 4.0 (the latter breaking our "bleeding edge" CI
    test).
    
    Raise our "latest releases" test to use 3.3.
    
    Our "bleeding edge" test picking up the now-called-4.0 OpenEXR main
    branch required some minor logic changes to not reject the version as
    too new to be compatible.
    
    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    5bba64d View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2024

  1. ci:(wheels): macos-x86_64 - move "brew uninstall" cmd to workflow

    Instead of defining the brew uninstall command at the pyproject.toml config level, define using an env var during the workflow run. This makes things more predictable when testing cibuildwheel locally
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    7b37f05 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6f61f63 View commit details
    Browse the repository at this point in the history
  3. build: Raise CMake minimum to 3.18

    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    d07cbe8 View commit details
    Browse the repository at this point in the history
  4. Fix prob with cmake 3.18.0..3.18.1

    Signed-off-by: Larry Gritz <[email protected]>
    Signed-off-by: Zach Lewis <[email protected]>
    lgritz authored and zachlewis committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    853952e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cf648f2 View commit details
    Browse the repository at this point in the history
  6. cleanup: python __init__.py, warn about loading DLLs from PATH on Win

    OCIO recently made the decision to disable the "Load DLLs from $PATH" hack for Python > 3.7 that they had copied from OIIO.
    We should follow suit -- this behavior was removed from Python for a reason (it was a security vulnerability).
    
    This PR warns users that this behavior is deprecated.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    221e4d8 View commit details
    Browse the repository at this point in the history
  7. build: Raise CMake minimum to 3.18

    Signed-off-by: Larry Gritz <[email protected]>
    lgritz committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    1036870 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2024

  1. Merge branch 'main' into python_cibuildwheels

    Signed-off-by: zachlewis <[email protected]>
    zachlewis authored Oct 3, 2024
    Configuration menu
    Copy the full SHA
    a882bcf View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'origin/python_cibuildwheels' into pytho…

    …n_cibuildwheels
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    c5ded6f View commit details
    Browse the repository at this point in the history
  3. Merge remote-tracking branch 'lgritz/lg-cmakedep' into python_cibuild…

    …wheels
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    63c7b56 View commit details
    Browse the repository at this point in the history
  4. cleanup(pyproject): Remove numpy dep + MacOS arch CMake defines

     - Remove "numpy" dependency -- technically, numpy is only needed if using `ImageBuf.get_data()` (I believe). Previously, we had set this to require numpy-2; but that caused the Python 3.8 wheels not to build.
    
     - Remove MacOS architecture CMake defines -- since we're using both x86_64 and ARM64 runners to build the ARM and intel wheels separately, we shouldn't have to worry about the ARM64 python modules trying to link x86_64 dependencies.
    
    - Test with  "oiiotool --buildinfo" instead of "oiiotool --help"
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    1fba61d View commit details
    Browse the repository at this point in the history
  5. ci(wheels): brew-uninstall freetype for macos-arm64 runs

    Turns out, /opt/homebrew/lib/libfreetype.a links a libPNG that wasn't built for arm64.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    f10ecfa View commit details
    Browse the repository at this point in the history
  6. ci(wheels): Adjust Workflow perms, GH pin Action vers, reenable cp38

    Now that numpy-2 isn't a requirement, we can re-enable Python 3.8 wheel builds.
    
    Also, I've added top-level permissions to the Workflow, and pinned the Action dependencies by hash to pass / improve the advanced security checks / scorecard
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    7a56416 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2024

  1. Configuration menu
    Copy the full SHA
    db440e9 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2024

  1. Update docs URL in pyproject.toml

    Co-authored-by: Jean-Christophe Morin <[email protected]>
    Signed-off-by: zachlewis <[email protected]>
    zachlewis and JeanChristopheMorinPerso authored Oct 14, 2024
    Configuration menu
    Copy the full SHA
    978e8f0 View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2024

  1. Configuration menu
    Copy the full SHA
    d45e634 View commit details
    Browse the repository at this point in the history
  2. build: Add IGNORE_HOMEBREWED_DEPS CMake option

    When `-DIGNORE_HOMEBREWED_DEPS=ON` is provided, ignore libraries that live under the following paths:
     - /opt/homebrew
     - /usr/local
     - /usr/X11
     - /usr/X11R6
    
    Also, builds invoked with `build_dependency_with_cmake` will now inherit CMAKE_IGNORE_PATH and CMAKE_IGNORE_PREFIX_PATH values set in a higher-level scope. This prevents dependencies from finding sub-dependencies where it shouldn't. For example, if we're ignoring homebrewed dependencies, even though brew-installed PNG and brew-installed freetype may be ignored when first trying to find the dependencies, we need to make sure that when we build freetype locally, we take care _not_ to link brew-installed PNG.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    deeba08 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9fa0a76 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    380e8c8 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2024

  1. build(wheels): Don't install versioned copies of libraries

    During a pip-based installation, install as few copies of OpenImageIO and OpenImageIO_Util as possible.
    
    Also, don't make versioned copies of OCIO
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    34d7e3a View commit details
    Browse the repository at this point in the history
  2. build(wheels): provide cmake prefix hint for downstream skbuild pkgs

    For downstream packages using scikit-build-core, append the OpenImageIOTarget.cmake directory to CMAKE_PREFIX_PATH, so that `find_package(OpenImageIO)` works as expected, fingers crossed.
    
    (should behave akin to setting -DOpenImageIO_DIR)
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    494a53c View commit details
    Browse the repository at this point in the history
  3. build: add /opt/X11 to prefixes skipped by IGNORE_HOMEBREWED_DEPS

    e.g., installed by XQuartz.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    9d0645d View commit details
    Browse the repository at this point in the history
  4. ci(wheels): disable CIBW repair-wheel step + remove tasks.py

    Not only do we remove the custom repairwheel step *entirely*, we want to make sure the default repairwheel step does not run at all.
    
    For some reason, `repairwheel`, `autditwheel`, etc. have trouble recognizing that the wheel first created by the build system is fine as-is, and doesn't need repairing. In a best-case scenario, the repair-wheel step ends up creating and packaging copies of OpenImageIO_Util and OpenColorIO.
    
    We may need to reintroduce a custom repair wheel step if we cannot insulate the build from other dependencies on runner images picked up by OIIO.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    d9b37c0 View commit details
    Browse the repository at this point in the history
  5. build: improve IGNORE_HOMEBREWED_DEPS building

    I've dedicated an entire "remove_prefixes_from_variable" cmake function to omitting prefixes from environment and cmake variables to help me debug and fine-tune dependency building. I believe this would be useful for tricky build recipes; but I think it would be better to pare this down for the immediate future, pending CI checks...
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    110e69a View commit details
    Browse the repository at this point in the history
  6. Revert "build(wheels): Don't install versioned copies of libraries"

    This reverts commit 34d7e3a.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    5373e98 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2024

  1. Configuration menu
    Copy the full SHA
    b13051d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    82053dd View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. build: add "NAMELINK_SKIP" option to install_targets

    Optionally disable creation of multiple versioned copies / symlinks of installed libraries.
    
    In other words, create libOpenImageIO.so.3.1.0; but not libOpenImageIO.so or libOpenImageIO.so.3.1.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    9437415 View commit details
    Browse the repository at this point in the history
  2. build(wheels): adjust RPATHs and skip namelinks

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    3e60ade View commit details
    Browse the repository at this point in the history
  3. ci(wheel): re-enable default CIBW repairwheel step

    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    a3fd5ea View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f63dbfb View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2024

  1. python(__init__.py): Set $OpenImageIO_ROOT before importing the module

    Assuming the wheel bundles fonts under <platlib>/OpenImageIO/share/fonts, setting the OpenImageIO_ROOT env var should help OIIO automatically find the fonts.
    
    As a bonus, pip-installed CLI tools will be aware of OpenImageIO_ROOT.
    
    Signed-off-by: Zach Lewis <[email protected]>
    zachlewis committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    f98635f View commit details
    Browse the repository at this point in the history