5 KiB
| id | title | sidebar_label |
|---|---|---|
| dev_build | Build openPYPE from source | Build |
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
To build Pype you currently need (on all platforms):
- Python 3.7 as we are following vfx platform.
- git
We use CX_Freeze to freeze the code and all dependencies.
<Tabs groupId="platforms" defaultValue="win" values={[ {label: 'Windows', value: 'win'}, {label: 'Linux', value: 'linux'}, {label: 'Mac', value: 'mac'}, ]}>
More tools might be needed for installing some dependencies (for example for OpenTimelineIO) - mostly development tools like CMake and Visual Studio
Clone repository:
git clone --recurse-submodules git@github.com:pypeclub/pype.git
Run from source
For development purposes it is possible to run OpenPype directly from the source. We provide a simple launcher script for this.
To start OpenPype from source you need to
- Run
.\tools\create_env.ps1to create virtual environment in.\venv - Run
.\tools\run_tray.ps1if you have all required dependencies on your machine you should be greeted with OpenPype igniter window and once you give it your Mongo URL, with OpenPype icon in the system tray.
To build openPype:
- Run
.\tools\create_env.ps1to create virtual environment in.\venv - Run
.\tools\build.ps1to build pype executables in.\build\
To create distributable openPype versions, run ./tools/create_zip.ps1 - that will
create zip file with name pype-vx.x.x.zip parsed from current pype repository and
copy it to user data dir. You can specify --path /path/to/zip to force it into a different
location. This can be used to prepare new version releases for artists in the studio environment
without the need to re-build the whole package
To build pype on linux you wil need:
- curl on systems that doesn't have one preinstalled.
- Python header files installed (python3-dev on Ubuntu for example).
- CMake: to build some external openPype dependencies.
- bzip2, readline and sqlite3 libraries.
Because some Linux distros come with newer Python version pre-installed, you might need to install 3.7 version and make use of it explicitly. Your best bet is probably using pyenv.
You can use your package manager to install git and cmake. Use curl for pyenv installation
:::note Install build requirements for Ubuntu
sudo apt install build-essential checkinstall
sudo apt install git cmake curl
sudo apt install libbz2-dev libreadline-dev libsqlite3-dev
In case you run in error about xcb when running Pype,
you'll need also additional libraries for Qt5:
sudo apt install qt5-default
:::
:::note Install build requirements for Centos
sudo yum install git cmake python3-devel python3-pip
sudo yum install bzip2-devel readline-devel sqlite-devel
In case you run in error about xcb when running Pype,
you'll need also additional libraries for Qt5:
sudo yum install qt5-qtbase-devel
:::
Common steps for all Distros
Use pyenv to prepare Python version for Pype build
curl https://pyenv.run | bash
# you can add those to ~/.bashrc
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
# reload shell
exec $SHELL
# install Python 3.7.9
pyenv install -v 3.7.9
# change path to pype 3
cd /path/to/pype-3
# set local python version
pyenv local 3.7.9
To build Pype:
- Run
.\tools\create_env.shto create virtual environment in.\venv - Run
.\tools\build.shto build pype executables in.\build\
To build pype on MacOS you wil need:
- Homebrew, Easy way of installing everything necessary is to use.
- CMake to build some external openPype dependencies.
- XCode Command Line Tools (or some other build system)
- Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install cmake:
brew install cmake
- Install pyenv:
brew install pyenv
echo 'eval "$(pypenv init -)"' >> ~/.zshrc
pyenv init
exec "$SHELL"
PATH=$(pyenv root)/shims:$PATH
- Pull in required Python version 3.7.x
# install Python build dependences
brew install openssl readline sqlite3 xz zlib
# replace with up-to-date 3.7.x version
pyenv install 3.7.9
- Set local Python version
# switch to Pype source directory
pyenv local 3.7.9
To build Pype:
- Run
.\tools\create_env.shto create virtual environment in.\venv - Run
.\tools\build.shto build Pype executables in.\build\