diff --git a/README.md b/README.md index b08b72b..ab202b8 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file + 2. Update the version and SHA512 in the OpenImageIO port files. diff --git a/macOS-10.13-azure-pipelines.yml b/macOS-10.13-azure-pipelines.yml index 8527fb6..11e8478 100644 --- a/macOS-10.13-azure-pipelines.yml +++ b/macOS-10.13-azure-pipelines.yml @@ -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 diff --git a/src/vcpkg/ports/openimageio-py3.6/portfile.cmake b/src/vcpkg/ports/openimageio-py3.6/portfile.cmake index 8fb5bb5..f203831 100644 --- a/src/vcpkg/ports/openimageio-py3.6/portfile.cmake +++ b/src/vcpkg/ports/openimageio-py3.6/portfile.cmake @@ -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") @@ -56,7 +57,7 @@ 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 @@ -64,10 +65,10 @@ vcpkg_configure_cmake( -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 diff --git a/src/vcpkg/ports/openimageio-py3.7/portfile.cmake b/src/vcpkg/ports/openimageio-py3.7/portfile.cmake index cc5fe76..7f7a6d3 100644 --- a/src/vcpkg/ports/openimageio-py3.7/portfile.cmake +++ b/src/vcpkg/ports/openimageio-py3.7/portfile.cmake @@ -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") @@ -56,7 +57,7 @@ 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 @@ -64,10 +65,10 @@ vcpkg_configure_cmake( -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 diff --git a/ubuntu16.04-azure-pipelines.yml b/ubuntu16.04-azure-pipelines.yml index 6a17505..e56e7ac 100644 --- a/ubuntu16.04-azure-pipelines.yml +++ b/ubuntu16.04-azure-pipelines.yml @@ -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 diff --git a/win2016-azure-pipelines.yml b/win2016-azure-pipelines.yml index 560c427..a04746e 100644 --- a/win2016-azure-pipelines.yml +++ b/win2016-azure-pipelines.yml @@ -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' @@ -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 @@ -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 @@ -90,12 +88,12 @@ 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: | @@ -103,55 +101,53 @@ jobs: 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) @@ -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)