-
-
Save tin2tin/4f502f9e39857f057e1292747c5e3781 to your computer and use it in GitHub Desktop.
Shell script to build a wheel of OpenTimelineIO 0.12.1
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
#!/bin/bash | |
# This script generate a wheel for OpenTimelineIO in dist folder | |
# We need it has a patch to install otio 0.12.1 in Windows Blender because it requires compilation | |
# This wheel should be distributed with code that depends on otio 0.12.1 and installed using Blender's python -m pip | |
# You need python (3.7.*) and Visual Studio 2017+ | |
CURRENT_DIR=`dirname $0` | |
ROOT_DIR=$CURRENT_DIR/ | |
mkdir -p $ROOT_DIR/dist/build_otio | |
pushd $ROOT_DIR/dist/build_otio | |
python -m venv .otio_venv | |
source .otio_venv/Scripts/activate | |
pip install wheel opentimelineio==0.12.1 --no-cache-dir -v | |
pip wheel opentimelineio | |
WHEEL_NAME=`ls Open*` | |
python -m zipfile -e $WHEEL_NAME _unzipped | |
# Put dlls at root of opentimelineio package | |
cp .otio_venv/Lib/site-packages/opentimelineio/cxx-libs/bin/*.dll _unzipped/opentimelineio/ | |
rm $WHEEL_NAME | |
python -m zipfile -c $WHEEL_NAME _unzipped/* | |
mv $WHEEL_NAME .. | |
popd | |
rm -rf $ROOT_DIR/dist/build_otio |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment