Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #958 from pypeclub/3.0/poetry
Browse files Browse the repository at this point in the history
Pype 3: Use Poetry
  • Loading branch information
mkolar authored Feb 4, 2021
2 parents 48e72b6 + 35dcbce commit 0de7606
Show file tree
Hide file tree
Showing 132 changed files with 39,663 additions and 282 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ Temporary Items
/build

/vendor/bin/*
/venv
/.venv
/venv/

# Documentation
###############
Expand Down Expand Up @@ -77,4 +78,5 @@ pype/premiere/ppro/js/debug.log

# VScode files
.vscode/
.env
.env
dump.sql
82 changes: 74 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Requirements
------------
Pype will run on most typical hardware configurations commonly found in studios around the world.
It is installed on artist computer and can take up 3Gb of space depending on number of versions
and other dependencies.
and other dependencies.

For well functioning [ftrack](https://www.ftrack.com/en/) event server, we recommend a
For well functioning [ftrack](https://www.ftrack.com/en/) event server, we recommend a
linux virtual server with [Ubuntu](https://ubuntu.com/) or [CentosOS](https://www.centos.org/).
CPU and RAM allocation need differ based on the studio size, but a 2GB of RAM, with a
dual core CPU and around 4GB of storage should suffice.
Expand Down Expand Up @@ -57,6 +57,62 @@ it will install it on current computer.

Pype is build using [CX_Freeze](https://cx-freeze.readthedocs.io/en/latest) to freeze itself and all dependencies.

### macOS

You will need [Python 3.7 and newer](https://www.python.org/downloads/) and [git](https://git-scm.com/downloads). You'll need also other tools to build
some Pype dependencies like [CMake](https://cmake.org/) and **XCode Command Line Tools** (or some other build system).

You can install **XCode Command Line Tools** from Terminal:
```sh
xcode-select --install
```

Before building Pype be sure to make **CMake** available in `PATH`:
```sh
export PATH=$PATH:/Applications/CMake.app/Contents/bin
```

#### To build Pype:

1) Run `.\tools\create_env.sh` to create virtual environment in `.\venv`
2) Run `.\tools\build.sh` to build Pype executables in `.\build\`


### Linux

You will need [Python 3.7 and newer](https://www.python.org/downloads/) and [git](https://git-scm.com/downloads). You'll need also other tools to build
some Pype dependencies like [CMake](https://cmake.org/). Python 3 should be part of all modern distributions. You can use your package manager to install **git** and **cmake**.

For Ubuntu:
```sh
sudo apt install git cmake
```

For CentOS:
```sh
sudo yum install qit cmake
```

#### Note:
In case you run in error about `xcb` when running Pype,
you'll need also additional libraries for Qt5:

For Ubuntu:
```sh
sudo apt install qt5-default
```
For CentOS:
```sh
sudo yum install qt5-qtbase-devel
```

#### To build Pype:

1) Run `.\tools\create_env.sh` to create virtual environment in `.\venv`
2) Run `.\tools\build.sh` to build Pype executables in `.\build\`



Running Pype
------------

Expand All @@ -67,40 +123,50 @@ If Pype is executed from live sources, it will use Pype version included in them
it is executed from frozen code it will try to find latest Pype version installed locally
on current computer and if it is not found, it will ask for its location. On that location
pype can be either in directories or zip files. Pype will try to find latest version and
install it to user data directory (on Windows to `%LOCALAPPDATA%\pypeclub\pype`).
install it to user data directory (on Windows to `%LOCALAPPDATA%\pypeclub\pype`, on Linux
`~/.local/share/pype` and on macOS in `~/Library/Application Support/pype`).

### From sources
Pype can be run directly from sources by activating virtual environment:

**On Windows:**
```powershell
.\venv\Scripts\Activate.ps1
```
and running:
```powershell
python start.py tray
```
**On macOS/Linux:**
```sh
source ./venv/bin/activate
python start.py tray
```


This will use current Pype version with sources. You can override this with `--use-version=x.x.x` and
then Pype will try to find locally installed specified version (present in user data directory).

### From frozen code

You need to build Pype first. This will produce two executables - `pype.exe` and `pype_console.exe`.
You need to build Pype first. This will produce two executables - `pype_gui(.exe)` and `pype_console(.exe)`.
First one will act as GUI application and will not create console (useful in production environments).
The second one will create console and will write output there - useful for headless application and
debugging purposes. If you need pype version installed, just run `./tools/create_zip.ps1` without
debugging purposes. If you need pype version installed, just run `./tools/create_zip(.ps1|.sh)` without
arguments and it will create zip file that pype can use.


Building documentation
----------------------

Top build API documentation, run `.\tools\make_docs.ps1`. It will create html documentation
Top build API documentation, run `.\tools\make_docs(.ps1|.sh)`. It will create html documentation
from current sources in `.\docs\build`.

**Note that it needs existing virtual environment.**

Running tests
-------------

To run tests, execute `.\tools\run_tests.ps1`.
To run tests, execute `.\tools\run_tests(.ps1|.sh)`.

**Note that it needs existing virtual environment.**
**Note that it needs existing virtual environment.**
Loading

0 comments on commit 0de7606

Please sign in to comment.