-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Add support for
pip install OpenImageIO
- Add build scripts for wheel dependencies. - Fix OpenColorIO. - Working wheel build. Signed-off-by: Alex Clark <[email protected]>
- Loading branch information
1 parent
b98d61d
commit 8ff082f
Showing
18 changed files
with
371 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Utility script to download and build libaom | ||
|
||
# Exit the whole script if any command fails. | ||
set -ex | ||
|
||
# Repo and branch/tag/commit of LIBAOM to download if we don't have it yet | ||
LIBAOM_REPO=${LIBAOM_REPO:=https://aomedia.googlesource.com/aom} | ||
LIBAOM_VERSION=${LIBAOM_VERSION:=v3.4.0} | ||
|
||
# Where to put libaom repo source (default to the ext area) | ||
LIBAOM_SRC_DIR=${LIBAOM_SRC_DIR:=${PWD}/ext/libaom} | ||
# Temp build area (default to a build/ subdir under source) | ||
LIBAOM_BUILD_DIR=${LIBAOM_BUILD_DIR:=${LIBAOM_SRC_DIR}/build} | ||
# Install area for libaom (default to ext/dist) | ||
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext} | ||
LIBAOM_INSTALL_DIR=${LIBAOM_INSTALL_DIR:=${LOCAL_DEPS_DIR}/dist} | ||
LIBAOM_BUILD_OPTS=${LIBAOM_BUILD_OPTS:=} | ||
|
||
pwd | ||
echo "libaom install dir will be: ${LIBAOM_INSTALL_DIR}" | ||
|
||
mkdir -p ./ext | ||
pushd ./ext | ||
|
||
# Clone libaom project from GitHub and build | ||
if [[ ! -e ${LIBAOM_SRC_DIR} ]] ; then | ||
echo "git clone ${LIBAOM_REPO} ${LIBAOM_SRC_DIR}" | ||
git clone ${LIBAOM_REPO} ${LIBAOM_SRC_DIR} | ||
fi | ||
cd ${LIBAOM_SRC_DIR} | ||
|
||
echo "git checkout ${LIBAOM_VERSION} --force" | ||
git checkout ${LIBAOM_VERSION} --force | ||
|
||
mkdir -p ${LIBAOM_BUILD_DIR} | ||
cd ${LIBAOM_BUILD_DIR} | ||
|
||
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then | ||
time cmake -DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=${LIBAOM_INSTALL_DIR} \ | ||
-DENABLE_DOCS=0 \ | ||
-DAOM_TARGET_CPU=generic \ | ||
${LIBAOM_BUILD_OPTS} .. | ||
time cmake --build . --config Release --target install | ||
fi | ||
|
||
# ls -R ${LIBAOM_INSTALL_DIR} | ||
popd | ||
|
||
#echo "listing .." | ||
#ls .. | ||
|
||
# Set up paths. These will only affect the caller if this script is | ||
# run with 'source' rather than in a separate shell. | ||
export LibAom_ROOT=$LIBAOM_INSTALL_DIR | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Utility script to download and build libaom | ||
|
||
# Exit the whole script if any command fails. | ||
set -ex | ||
|
||
# Repo and branch/tag/commit of LIBDE265 to download if we don't have it yet | ||
LIBDE265_REPO=${LIBDE265_REPO:=https://github.com/strukturag/libde265.git} | ||
LIBDE265_VERSION=${LIBDE265_VERSION:=v1.0.8} | ||
|
||
# Where to put libaom repo source (default to the ext area) | ||
LIBDE265_SRC_DIR=${LIBDE265_SRC_DIR:=${PWD}/ext/libde265} | ||
# Temp build area (default to a build/ subdir under source) | ||
LIBDE265_BUILD_DIR=${LIBDE265_BUILD_DIR:=${LIBDE265_SRC_DIR}/build} | ||
# Install area for libaom (default to ext/dist) | ||
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext} | ||
LIBDE265_INSTALL_DIR=${LIBDE265_INSTALL_DIR:=${LOCAL_DEPS_DIR}/dist} | ||
LIBDE265_BUILD_OPTS=${LIBDE265_BUILD_OPTS:=} | ||
|
||
pwd | ||
echo "libaom install dir will be: ${LIBDE265_INSTALL_DIR}" | ||
|
||
mkdir -p ./ext | ||
pushd ./ext | ||
|
||
# Clone libaom project from GitHub and build | ||
if [[ ! -e ${LIBDE265_SRC_DIR} ]] ; then | ||
echo "git clone ${LIBDE265_REPO} ${LIBDE265_SRC_DIR}" | ||
git clone ${LIBDE265_REPO} ${LIBDE265_SRC_DIR} | ||
fi | ||
cd ${LIBDE265_SRC_DIR} | ||
|
||
echo "git checkout ${LIBDE265_VERSION} --force" | ||
git checkout ${LIBDE265_VERSION} --force | ||
|
||
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then | ||
time ./autogen.sh | ||
|
||
time ./configure --prefix=${LIBDE265_INSTALL_DIR} --disable-dec265 --disable-sherlock265 | ||
time make -j 16 | ||
|
||
# mkdir -p ${LIBDE265_BUILD_DIR} | ||
# cd ${LIBDE265_BUILD_DIR} | ||
|
||
# time cmake -DCMAKE_BUILD_TYPE=Release \ | ||
# -DCMAKE_INSTALL_PREFIX=${LIBDE265_INSTALL_DIR} \ | ||
# -DENABLE_SDL=OFF \ | ||
# ${LIBDE265_BUILD_OPTS} .. | ||
# time | ||
# time cmake --build . --config Release --target install | ||
fi | ||
|
||
# ls -R ${LIBDE265_INSTALL_DIR} | ||
popd | ||
|
||
#echo "listing .." | ||
#ls .. | ||
|
||
# Set up paths. These will only affect the caller if this script is | ||
# run with 'source' rather than in a separate shell. | ||
export LibDe265_ROOT=$LIBDE265_INSTALL_DIR | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Utility script to download and build libaom | ||
|
||
# Exit the whole script if any command fails. | ||
set -ex | ||
|
||
# Repo and branch/tag/commit of LIBHEIF to download if we don't have it yet | ||
LIBHEIF_REPO=${LIBHEIF_REPO:=https://github.com/strukturag/libheif.git} | ||
LIBHEIF_VERSION=${LIBHEIF_VERSION:=v1.12.0} | ||
|
||
# Where to put libaom repo source (default to the ext area) | ||
LIBHEIF_SRC_DIR=${LIBHEIF_SRC_DIR:=${PWD}/ext/libheif} | ||
# Temp build area (default to a build/ subdir under source) | ||
LIBHEIF_BUILD_DIR=${LIBHEIF_BUILD_DIR:=${LIBHEIF_SRC_DIR}/build} | ||
# Install area for libaom (default to ext/dist) | ||
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext} | ||
LIBHEIF_INSTALL_DIR=${LIBHEIF_INSTALL_DIR:=${LOCAL_DEPS_DIR}/dist} | ||
LIBHEIF_BUILD_OPTS=${LIBHEIF_BUILD_OPTS:=} | ||
|
||
pwd | ||
echo "libaom install dir will be: ${LIBHEIF_INSTALL_DIR}" | ||
|
||
mkdir -p ./ext | ||
pushd ./ext | ||
|
||
# Clone libaom project from GitHub and build | ||
if [[ ! -e ${LIBHEIF_SRC_DIR} ]] ; then | ||
echo "git clone ${LIBHEIF_REPO} ${LIBHEIF_SRC_DIR}" | ||
git clone ${LIBHEIF_REPO} ${LIBHEIF_SRC_DIR} | ||
fi | ||
cd ${LIBHEIF_SRC_DIR} | ||
|
||
echo "git checkout ${LIBHEIF_VERSION} --force" | ||
git checkout ${LIBHEIF_VERSION} --force | ||
|
||
mkdir -p ${LIBHEIF_BUILD_DIR} | ||
cd ${LIBHEIF_BUILD_DIR} | ||
|
||
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then | ||
time cmake -DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=${LIBHEIF_INSTALL_DIR} \ | ||
-DWITH_RAV1E=OFF \ | ||
-WITH_DAV1D=OFF \ | ||
-DCMAKE_FIND_LIBRARY_SUFFIXES=.a \ | ||
${LIBHEIF_BUILD_OPTS} .. | ||
time cmake --build . --config Release --target install | ||
fi | ||
|
||
# ls -R ${LIBHEIF_INSTALL_DIR} | ||
popd | ||
|
||
#echo "listing .." | ||
#ls .. | ||
|
||
# Set up paths. These will only affect the caller if this script is | ||
# run with 'source' rather than in a separate shell. | ||
export Libheif_ROOT=$LIBHEIF_INSTALL_DIR | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
apt update | ||
# apt upgrade -y | ||
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install sudo wget gzip software-properties-common -y | ||
|
||
if [[ ! -d /opt/cmake ]]; then | ||
currentPath=$(pwd) | ||
wget https://github.com/Kitware/CMake/releases/download/v3.23.2/cmake-3.23.2-linux-x86_64.tar.gz | ||
mkdir -p /opt/cmake | ||
cd /opt | ||
tar -xzf "${currentPath}/cmake-3.23.2-linux-x86_64.tar.gz" | ||
rm "${currentPath}/cmake-3.23.2-linux-x86_64.tar.gz" | ||
mv cmake-3.23.2-linux-x86_64/* cmake/ | ||
rm -rf cmake-3.23.2-linux-x86_64/ | ||
cd "${currentPath}" | ||
fi | ||
|
||
export PATH=/opt/cmake/bin:$PATH | ||
|
||
export CXX=g++-8 | ||
export CC=gcc-8 | ||
export COMPILER=gcc-8 | ||
export CMAKE_CXX_STANDARD=17 | ||
|
||
export USE_OPENVDB=0 | ||
export USE_QT5=0 | ||
export USE_OPENGL=0 | ||
export USE_NUKE=0 | ||
export USE_R3DSDK=0 | ||
export USE_JPEGTURBO=0 | ||
|
||
export USE_FFMPEG=1 | ||
export USE_PNG=1 | ||
export USE_OPENCV=0 | ||
export USE_GIF=1 | ||
export USE_PTEX=1 | ||
export USE_WEBP=1 | ||
export USE_OPENCOLORIO=1 | ||
export USE_OPENEXR=1 | ||
export USE_LIBHEIF=1 | ||
export USE_TIFF=1 | ||
export USE_LIBRAW=1 | ||
export USE_OPENJPEG=1 | ||
export USE_FREETYPE=1 | ||
|
||
export OPENCOLORIO_VERSION=v2.1.2 | ||
export PUGIXML_VERSION=v1.11.4 | ||
export FMT_VERSION=9.0.0 | ||
export OPENEXR_VERSION=v3.1.5 | ||
export PYBIND11_VERSION=v2.9.2 | ||
|
||
export OPENCOLORIO_BUILD_SHARED_LIBS=OFF | ||
export OPENEXR_CMAKE_FLAGS=-DBUILD_SHARED_LIBS=OFF | ||
export PUGIXML_BUILD_OPTS=-DBUILD_SHARED_LIBS=OFF | ||
|
||
export MY_CMAKE_FLAGS="${MY_CMAKE_FLAGS} -DBUILD_SHARED_LIBS=OFF -DLINKSTATIC=ON -DOIIO_BUILD_TESTS=OFF -DOPENCOLORIO_NO_CONFIG=ON -DOIIO_BUILD_TOOLS=ON" | ||
export PYTHON_VERSION=3.9 | ||
|
||
export OPENIMAGEIO_OPTIONS="openexr:core=1" | ||
|
||
source src/build-scripts/ci-startup.bash | ||
|
||
export CMAKE_BUILD_PARALLEL_LEVEL=16 | ||
|
||
unset TERM | ||
|
||
apt install python3 python3-pip cmake pkg-config -y | ||
python3 -m pip install conan | ||
|
||
source src/build-scripts/gh-installdeps.bash | ||
|
||
source src/build-scripts/ci-build.bash |
Oops, something went wrong.