Skip to content
This repository was archived by the owner on Sep 13, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ See the `tests` folder for code examples used to test the built wheels' function
- A new release is automatically performed when a commit is performed on the `master` branch.
- Updating to a newer OpenImageIO version:
1. Update the `oiio.version` variable in the .yml files
2. Update the version and SHA512 in the OpenImageIO port files.
2. Update the version and SHA512 in the OpenImageIO port files.
14 changes: 9 additions & 5 deletions macOS-10.13-azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,22 @@ jobs:
./vcpkg list
displayName: Install python3 and pybind11

# Install oiio prerequisites via vcpkg
# Install oiio extras
- bash: |
cd $(install.vcpkg)
./vcpkg list
./vcpkg install openexr:x64-osx
./vcpkg install tiff:x64-osx
./vcpkg install zlib:x64-osx
./vcpkg install freetype:x64-osx
# ./vcpkg install giflib:x64-osx # https://github.com/fredrikaverpil/oiio-python/issues/27
# ./vcpkg install openjpeg:x64-osx # https://github.com/fredrikaverpil/oiio-python/issues/26
./vcpkg install libpng:x64-osx
./vcpkg install libwebp:x64-osx
./vcpkg install ptex:x64-osx
./vcpkg list
displayName: Install oiio prerequisites
displayName: Install oiio extras

# Install oiio
- bash: |
$env:OIIO_PYTHON_VERSION = "$(python.version)"
cd $(install.vcpkg)
./vcpkg list
./vcpkg install openimageio:x64-osx
Expand Down
17 changes: 9 additions & 8 deletions src/vcpkg/ports/openimageio-py3.6/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ else()
set(LINKSTATIC OFF)
endif()

# Features
set(USE_LIBRAW OFF)
if("libraw" IN_LIST FEATURES)
set(USE_LIBRAW ON)
endif()
# # Features
# set(USE_LIBRAW OFF)
#if("libraw" IN_LIST FEATURES)
# set(USE_LIBRAW ON)
# endif()
set(USE_LIBRAW ON)

set(ENV{OIIO_PYTHON_VERSION} "3.6")

Expand Down Expand Up @@ -56,18 +57,18 @@ vcpkg_configure_cmake(
-DUSE_DICOM=OFF
-DUSE_FFMPEG=OFF
-DUSE_FIELD3D=OFF
-DUSE_FREETYPE=OFF
-DUSE_FREETYPE=ON
-DUSE_GIF=OFF
-DUSE_LIBRAW=${USE_LIBRAW}
-DUSE_NUKE=OFF
-DUSE_OCIO=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENJPEG=OFF
-DUSE_OPENSSL=OFF
-DUSE_PTEX=OFF
-DUSE_PTEX=ON
-DUSE_PYTHON=ON
-DUSE_QT=OFF
-DUSE_WEBP=OFF
-DUSE_WEBP=ON
-DBUILDSTATIC=${BUILDSTATIC}
-DLINKSTATIC=${LINKSTATIC}
-DBUILD_MISSING_PYBIND11=ON
Expand Down
17 changes: 9 additions & 8 deletions src/vcpkg/ports/openimageio-py3.7/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ else()
set(LINKSTATIC OFF)
endif()

# Features
set(USE_LIBRAW OFF)
if("libraw" IN_LIST FEATURES)
set(USE_LIBRAW ON)
endif()
# # Features
# set(USE_LIBRAW OFF)
#if("libraw" IN_LIST FEATURES)
# set(USE_LIBRAW ON)
# endif()
set(USE_LIBRAW ON)

set(ENV{OIIO_PYTHON_VERSION} "3.7")

Expand Down Expand Up @@ -56,18 +57,18 @@ vcpkg_configure_cmake(
-DUSE_DICOM=OFF
-DUSE_FFMPEG=OFF
-DUSE_FIELD3D=OFF
-DUSE_FREETYPE=OFF
-DUSE_FREETYPE=ON
-DUSE_GIF=OFF
-DUSE_LIBRAW=${USE_LIBRAW}
-DUSE_NUKE=OFF
-DUSE_OCIO=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENJPEG=OFF
-DUSE_OPENSSL=OFF
-DUSE_PTEX=OFF
-DUSE_PTEX=ON
-DUSE_PYTHON=ON
-DUSE_QT=OFF
-DUSE_WEBP=OFF
-DUSE_WEBP=ON
-DBUILDSTATIC=${BUILDSTATIC}
-DLINKSTATIC=${LINKSTATIC}
-DBUILD_MISSING_PYBIND11=ON
Expand Down
36 changes: 22 additions & 14 deletions ubuntu16.04-azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,25 +80,33 @@ jobs:
cp -r -v $(src.vcpkg)/ports/pybind11-py$(python.version)/* $(install.vcpkg)/ports/pybind11
displayName: Override vcpkg port files

# Install oiio prerequisites via vcpkg
# - bash: |
# cd vcpkg
# ./vcpkg list
# ./vcpkg install openexr:x64-linux
# ./vcpkg install tiff:x64-linux
# ./vcpkg install python3:x64-linux
# ./vcpkg install pybind11:x64-linux
# ./vcpkg list
# condition: eq( variables['Agent.OS'], 'Linux' )
# displayName: Install prerequisites
# Install python3 and pybind11 via vcpkg
- bash: |
cd $(install.vcpkg)
./vcpkg list
./vcpkg install python3:x64-linux
./vcpkg install pybind11:x64-linux
./vcpkg list
displayName: Install python3 and pybind11

# Install oiio extras
- bash: |
cd $(install.vcpkg)
./vcpkg list
./vcpkg install zlib:x64-linux
./vcpkg install freetype:x64-linux
# ./vcpkg install giflib:x64-linux # https://github.com/fredrikaverpil/oiio-python/issues/27
# ./vcpkg install openjpeg:x64-linux # https://github.com/fredrikaverpil/oiio-python/issues/26
./vcpkg install libpng:x64-linux
./vcpkg install libwebp:x64-linux
./vcpkg install ptex:x64-linux
./vcpkg list
displayName: Install oiio extras

# Install oiio
- bash: |
$env:OIIO_PYTHON_VERSION = "$(python.version)"
cd vcpkg
./vcpkg list
./vcpkg install python3:x64-linux
./vcpkg install pybind11:x64-linux
./vcpkg install openimageio:x64-linux
./vcpkg list
displayName: Install oiio
Expand Down
61 changes: 28 additions & 33 deletions win2016-azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
azure.vm_image: 'vs2017-win2016'
src.python: '$(Agent.BuildDirectory)/s/src/python'
src.vcpkg: '$(Agent.BuildDirectory)/s/src/vcpkg'
install.vcpkg: 'C:/vcpkg'
tests: '$(Agent.BuildDirectory)/s/tests'
oiio.version: '2.0.5'
pypackage.os_name: 'Microsoft :: Windows'
Expand Down Expand Up @@ -54,7 +55,6 @@ jobs:
sed -i 's/PYTHON_VERSION/$(python.version)/g' setup.py
sed -i 's/OS_NAME/$(pypackage.os_name)/g' setup.py
cat setup.py
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Inject variable values into setup.py

# Instal vcpkg
Expand All @@ -65,15 +65,13 @@ jobs:
.\bootstrap-vcpkg.bat
.\vcpkg integrate install
.\vcpkg update
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Install vcpkg

# Copy customized port(s) into place
- powershell: |
cp -r -v $(src.vcpkg)/ports/python3-py$(python.version).$(python.version_patch)/* C:/vcpkg/ports/python3
cp -r -v $(src.vcpkg)/ports/openimageio-py$(python.version)/* C:/vcpkg/ports/openimageio
cp -r -v $(src.vcpkg)/ports/pybind11-py$(python.version)/* C:/vcpkg/ports/pybind11
condition: eq( variables['Agent.OS'], 'Windows_NT' )
cp -r -v $(src.vcpkg)/ports/python3-py$(python.version).$(python.version_patch)/* $(install.vcpkg)/ports/python3
cp -r -v $(src.vcpkg)/ports/openimageio-py$(python.version)/* $(install.vcpkg)/ports/openimageio
cp -r -v $(src.vcpkg)/ports/pybind11-py$(python.version)/* $(install.vcpkg)/ports/pybind11
displayName: Override vcpkg port files

# Install Python Interpreter to default location
Expand All @@ -90,68 +88,66 @@ jobs:

# Install pybind11 via vcpkg
- powershell: |
cd C:/vcpkg
cd $(install.vcpkg)
.\vcpkg list
.\vcpkg install python3:x64-windows
.\vcpkg install pybind11:x64-windows
.\vcpkg list
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Install pybind11
displayName: Install python3 and pybind11

# Uninstall Python Interpreter
- powershell: |
if (Test-Path "C:/Python37/python.exe") { choco uninstall python -y --version $(python.version).$(python.version_patch) }
condition: eq(variables['python.version'], '3.7')
displayName: 'Workaround: Uninstall Python 3.7 Interpreter'

# Install oiio prerequisites via vcpkg
# Install oiio extras
- powershell: |
cd C:/vcpkg
cd $(install.vcpkg)
.\vcpkg list
.\vcpkg install openexr:x64-windows
.\vcpkg install tiff:x64-windows
.\vcpkg install zlib:x64-windows
.\vcpkg install freetype:x64-windows
# .\vcpkg install giflib:x64-windows # https://github.com/fredrikaverpil/oiio-python/issues/27
# .\vcpkg install openjpeg:x64-windows # https://github.com/fredrikaverpil/oiio-python/issues/26
.\vcpkg install libpng:x64-windows
.\vcpkg install libwebp:x64-windows
.\vcpkg install ptex:x64-windows
.\vcpkg list
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Install oiio prerequisites
displayName: Install oiio extras

- powershell: |
$env:OIIO_PYTHON_VERSION = "$(python.version)"
cd C:/vcpkg
cd $(install.vcpkg)
.\vcpkg list
.\vcpkg install openimageio:x64-windows
.\vcpkg list
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Install oiio

# Debug logs
- powershell: |
if (Test-Path "C:/vcpkg/buildtrees/openimageio/config-x64-windows-err.log") { cat C:/vcpkg/buildtrees/openimageio/config-x64-windows-err.log }
if (Test-Path "C:/vcpkg/buildtrees/openimageio/config-x64-windows-out.log") { cat C:/vcpkg/buildtrees/openimageio/config-x64-windows-out.log }
if (Test-Path "C:/vcpkg/buildtrees/openimageio/install-x64-windows-dbg-err.log") { cat C:/vcpkg/buildtrees/openimageio/install-x64-windows-dbg-err.log }
if (Test-Path "C:/vcpkg/buildtrees/openimageio/install-x64-windows-dbg-out.log") { cat C:/vcpkg/buildtrees/openimageio/install-x64-windows-dbg-out.log }
if (Test-Path "C:/vcpkg/buildtrees/openimageio/install-x64-windows-rel-err.log") { cat C:/vcpkg/buildtrees/openimageio/install-x64-windows-rel-err.log }
if (Test-Path "C:/vcpkg/buildtrees/openimageio/install-x64-windows-rel-out.log") { cat C:/vcpkg/buildtrees/openimageio/install-x64-windows-rel-out.log }
condition: eq( variables['Agent.OS'], 'Windows_NT' )
if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/config-x64-windows-err.log") { cat $(install.vcpkg)/buildtrees/openimageio/config-x64-windows-err.log }
if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/config-x64-windows-out.log") { cat $(install.vcpkg)/buildtrees/openimageio/config-x64-windows-out.log }
if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-err.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-err.log }
if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-out.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-out.log }
if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-err.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-err.log }
if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-out.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-out.log }
displayName: Build logs for oiio

# View files from built and installed oiio
- powershell: |
cd C:\vcpkg\installed\x64-windows\bin
cd $(install.vcpkg)/installed/x64-windows/bin
tree /F
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Show contents of oiio bin folder tree
- powershell: |
cd C:\vcpkg\installed\x64-windows\lib\python$(python.version)\site-packages
cd $(install.vcpkg)/installed/x64-windows/lib/python$(python.version)/site-packages
tree /F
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Show contents of oiio site-packages folder tree

# Copy files into Python package
- powershell: |
cp -r -v C:\vcpkg\installed\x64-windows\lib\python$(python.version)\site-packages\*.pyd $(src.python)/oiio
cp -r -v C:\vcpkg\installed\x64-windows\bin\*.dll $(src.python)/oiio
cp -r -v $(install.vcpkg)/installed/x64-windows/lib/python$(python.version)/site-packages/*.pyd $(src.python)/oiio
cp -r -v $(install.vcpkg)/installed/x64-windows/bin/*.dll $(src.python)/oiio
cd $(src.python)
tree /F
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Copy files into oiio Python package
- powershell: |
cd $(src.python)
Expand All @@ -160,7 +156,6 @@ jobs:
python setup.py bdist_wheel --python-tag=cp$(python.version_major)$(python.version_minor) --plat-name=win-amd64 --dist-dir="$(Build.ArtifactStagingDirectory)"
cd $(Build.ArtifactStagingDirectory)
tree /F
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Build wheel

# Publish wheel as build artifact (see "Summary" in Azure Pipelines build)
Expand Down