Skip to content

Commit

Permalink
Merge pull request #2030 from pupil-labs/develop
Browse files Browse the repository at this point in the history
Pupil v2.5 Release Candidate 1
  • Loading branch information
papr authored Oct 19, 2020
2 parents f979d4e + fdb4c56 commit 70e93bc
Show file tree
Hide file tree
Showing 45 changed files with 1,162 additions and 1,448 deletions.
1 change: 1 addition & 0 deletions .travis/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ python -m pip install -U pip
pip install -U git+https://github.com/pupil-labs/pyndsi
pip install -U git+https://github.com/pupil-labs/PyAV
pip install scikit-learn
pip install glfw

pip install pytest==5.2.2
pytest
29 changes: 23 additions & 6 deletions deployment/deploy_capture/bundle.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# -*- mode: python -*-


import platform, sys, os, os.path, numpy, glob, pathlib
import glob
import os
import os.path
import pathlib
import platform
import sys

import numpy
import pkg_resources
from PyInstaller.utils.hooks import collect_submodules

hidden_imports = []
Expand All @@ -14,8 +22,9 @@ hidden_imports += collect_submodules("pyglui")
hidden_imports += collect_submodules("pupil_apriltags")
hidden_imports += collect_submodules("sklearn")

from pyglui import ui
import glfw
import pupil_apriltags
from pyglui import ui

apriltag_lib_path = pathlib.Path(pupil_apriltags.__file__).parent

Expand All @@ -25,6 +34,12 @@ def apriltag_relative_path(absolute_path):
return os.path.join(*absolute_path.parts[-3:])


glfw_name = glfw._glfw._name
glfw_path = pathlib.Path(glfw_name)
if not glfw_path.exists():
glfw_path = pathlib.Path(pkg_resources.resource_filename("glfw", glfw_name))
glfw_binaries = [(glfw_path.name, str(glfw_path), "BINARY")]

if platform.system() == "Darwin":
sys.path.append(".")
from version import pupil_version
Expand Down Expand Up @@ -63,11 +78,11 @@ if platform.system() == "Darwin":
a.binaries - libSystem,
a.zipfiles,
a.datas,
[("libglfw.dylib", "/usr/local/lib/libglfw.dylib", "BINARY")],
[("pyglui/OpenSans-Regular.ttf", ui.get_opensans_font_path(), "DATA")],
[("pyglui/Roboto-Regular.ttf", ui.get_roboto_font_path(), "DATA")],
[("pyglui/pupil_icons.ttf", ui.get_pupil_icons_font_path(), "DATA")],
apriltag_libs,
glfw_binaries,
strip=None,
upx=True,
name="Pupil Capture",
Expand Down Expand Up @@ -125,19 +140,21 @@ elif platform.system() == "Linux":
binaries,
a.zipfiles,
a.datas,
[("libglfw.so", "/usr/local/lib/libglfw.so", "BINARY")],
[("libGLEW.so", "/usr/lib/x86_64-linux-gnu/libGLEW.so", "BINARY")],
[("pyglui/OpenSans-Regular.ttf", ui.get_opensans_font_path(), "DATA")],
[("pyglui/Roboto-Regular.ttf", ui.get_roboto_font_path(), "DATA")],
[("pyglui/pupil_icons.ttf", ui.get_pupil_icons_font_path(), "DATA")],
apriltag_libs,
glfw_binaries,
strip=True,
upx=True,
name="pupil_capture",
)

elif platform.system() == "Windows":
import sys, os, os.path
import os
import os.path
import sys

np_path = os.path.dirname(numpy.__file__)
np_dlls = glob.glob(np_path + "/core/*.dll")
Expand Down Expand Up @@ -194,11 +211,11 @@ elif platform.system() == "Windows":
a.zipfiles,
a.datas,
[("PupilDrvInst.exe", "../../pupil_external/PupilDrvInst.exe", "BINARY")],
[("glfw3.dll", "../../pupil_external/glfw3.dll", "BINARY")],
[("pyglui/OpenSans-Regular.ttf", ui.get_opensans_font_path(), "DATA")],
[("pyglui/Roboto-Regular.ttf", ui.get_roboto_font_path(), "DATA")],
[("pyglui/pupil_icons.ttf", ui.get_pupil_icons_font_path(), "DATA")],
apriltag_libs,
glfw_binaries,
vc_redist_libs,
np_dll_list,
strip=False,
Expand Down
29 changes: 23 additions & 6 deletions deployment/deploy_player/bundle.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# -*- mode: python -*-


import platform, sys, os, os.path, zmq, glob, numpy, pathlib
import glob
import os
import os.path
import pathlib
import platform
import sys

import numpy
import pkg_resources
from PyInstaller.utils.hooks import collect_submodules

hidden_imports = []
Expand All @@ -14,8 +22,9 @@ hidden_imports += collect_submodules("pyglui")
hidden_imports += collect_submodules("pupil_apriltags")
hidden_imports += collect_submodules("sklearn")

from pyglui import ui
import glfw
import pupil_apriltags
from pyglui import ui

apriltag_lib_path = pathlib.Path(pupil_apriltags.__file__).parent

Expand All @@ -25,6 +34,12 @@ def apriltag_relative_path(absolute_path):
return os.path.join(*absolute_path.parts[-3:])


glfw_name = glfw._glfw._name
glfw_path = pathlib.Path(glfw_name)
if not glfw_path.exists():
glfw_path = pathlib.Path(pkg_resources.resource_filename("glfw", glfw_name))
glfw_binaries = [(glfw_path.name, str(glfw_path), "BINARY")]

if platform.system() == "Darwin":
sys.path.append(".")
from version import pupil_version
Expand Down Expand Up @@ -64,11 +79,11 @@ if platform.system() == "Darwin":
a.binaries - libSystem,
a.zipfiles,
a.datas,
[("libglfw.dylib", "/usr/local/lib/libglfw.dylib", "BINARY")],
[("pyglui/OpenSans-Regular.ttf", ui.get_opensans_font_path(), "DATA")],
[("pyglui/Roboto-Regular.ttf", ui.get_roboto_font_path(), "DATA")],
[("pyglui/pupil_icons.ttf", ui.get_pupil_icons_font_path(), "DATA")],
apriltag_libs,
glfw_binaries,
strip=None,
upx=True,
name="Pupil Player",
Expand Down Expand Up @@ -127,19 +142,21 @@ elif platform.system() == "Linux":
binaries,
a.zipfiles,
a.datas,
[("libglfw.so", "/usr/local/lib/libglfw.so", "BINARY")],
[("libGLEW.so", "/usr/lib/x86_64-linux-gnu/libGLEW.so", "BINARY")],
[("pyglui/OpenSans-Regular.ttf", ui.get_opensans_font_path(), "DATA")],
[("pyglui/Roboto-Regular.ttf", ui.get_roboto_font_path(), "DATA")],
[("pyglui/pupil_icons.ttf", ui.get_pupil_icons_font_path(), "DATA")],
apriltag_libs,
glfw_binaries,
strip=True,
upx=True,
name="pupil_player",
)

elif platform.system() == "Windows":
import sys, os, os.path
import os
import os.path
import sys

np_path = os.path.dirname(numpy.__file__)
np_dlls = glob.glob(np_path + "/core/*.dll")
Expand Down Expand Up @@ -191,11 +208,11 @@ elif platform.system() == "Windows":
a.binaries,
a.zipfiles,
a.datas,
[("glfw3.dll", "../../pupil_external/glfw3.dll", "BINARY")],
[("pyglui/OpenSans-Regular.ttf", ui.get_opensans_font_path(), "DATA")],
[("pyglui/Roboto-Regular.ttf", ui.get_roboto_font_path(), "DATA")],
[("pyglui/pupil_icons.ttf", ui.get_pupil_icons_font_path(), "DATA")],
apriltag_libs,
glfw_binaries,
vc_redist_libs,
np_dll_list,
strip=None,
Expand Down
27 changes: 22 additions & 5 deletions deployment/deploy_service/bundle.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# -*- mode: python -*-


import platform, sys, os, os.path, numpy, glob, pathlib
import glob
import os
import os.path
import pathlib
import platform
import sys

import numpy
import pkg_resources
from PyInstaller.utils.hooks import collect_submodules

hidden_imports = []
Expand All @@ -13,8 +21,15 @@ if platform.system() != "Windows":
hidden_imports += collect_submodules("pyglui")
hidden_imports += collect_submodules("sklearn")

import glfw
from pyglui import ui

glfw_name = glfw._glfw._name
glfw_path = pathlib.Path(glfw_name)
if not glfw_path.exists():
glfw_path = pathlib.Path(pkg_resources.resource_filename("glfw", glfw_name))
glfw_binaries = [(glfw_path.name, str(glfw_path), "BINARY")]

if platform.system() == "Darwin":
sys.path.append(".")
from version import pupil_version
Expand Down Expand Up @@ -48,10 +63,10 @@ if platform.system() == "Darwin":
a.binaries - libSystem,
a.zipfiles,
a.datas,
[("libglfw.dylib", "/usr/local/lib/libglfw.dylib", "BINARY")],
[("pyglui/OpenSans-Regular.ttf", ui.get_opensans_font_path(), "DATA")],
[("pyglui/Roboto-Regular.ttf", ui.get_roboto_font_path(), "DATA")],
[("pyglui/pupil_icons.ttf", ui.get_pupil_icons_font_path(), "DATA")],
glfw_binaries,
strip=None,
upx=True,
name="Pupil Service",
Expand Down Expand Up @@ -105,18 +120,20 @@ elif platform.system() == "Linux":
binaries,
a.zipfiles,
a.datas,
[("libglfw.so", "/usr/local/lib/libglfw.so", "BINARY")],
[("libGLEW.so", "/usr/lib/x86_64-linux-gnu/libGLEW.so", "BINARY")],
[("pyglui/OpenSans-Regular.ttf", ui.get_opensans_font_path(), "DATA")],
[("pyglui/Roboto-Regular.ttf", ui.get_roboto_font_path(), "DATA")],
[("pyglui/pupil_icons.ttf", ui.get_pupil_icons_font_path(), "DATA")],
glfw_binaries,
strip=True,
upx=True,
name="pupil_service",
)

elif platform.system() == "Windows":
import sys, os, os.path
import os
import os.path
import sys

np_path = os.path.dirname(numpy.__file__)
np_dlls = glob.glob(np_path + "/core/*.dll")
Expand Down Expand Up @@ -168,10 +185,10 @@ elif platform.system() == "Windows":
a.zipfiles,
a.datas,
[("PupilDrvInst.exe", "../../pupil_external/PupilDrvInst.exe", "BINARY")],
[("glfw3.dll", "../../pupil_external/glfw3.dll", "BINARY")],
[("pyglui/OpenSans-Regular.ttf", ui.get_opensans_font_path(), "DATA")],
[("pyglui/Roboto-Regular.ttf", ui.get_roboto_font_path(), "DATA")],
[("pyglui/pupil_icons.ttf", ui.get_pupil_icons_font_path(), "DATA")],
glfw_binaries,
np_dll_list,
vc_redist_libs,
strip=False,
Expand Down
2 changes: 1 addition & 1 deletion docs/dependencies-macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ brew install portaudio
# tbb is included by default with https://github.com/Homebrew/homebrew-core/pull/20101
brew install opencv
brew install glew
brew install glfw3
# dependencies for 2d_3d c++ detector
brew install ceres-solver
```
Expand Down Expand Up @@ -80,6 +79,7 @@ pip install pyopengl
pip install pyzmq
pip install scikit-learn
pip install scipy
pip install glfw
pip install git+https://github.com/zeromq/pyre

pip install pupil-apriltags
Expand Down
16 changes: 1 addition & 15 deletions docs/dependencies-ubuntu17.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@ sudo apt-get update
sudo apt install -y pkg-config git cmake build-essential nasm wget python3-setuptools libusb-1.0-0-dev python3-dev python3-pip python3-numpy python3-scipy libglew-dev libtbb-dev
```

## glfw
Pupil requires glfw v3.3.2, which you can install from source with:
```sh
sudo apt install xorg-dev
git clone https://github.com/glfw/glfw
cd glfw
git checkout 3.3.2
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make
sudo make install
sudo ldconfig
```

## ffmpeg3

Install ffmpeg3 from jonathonf's ppa:
Expand Down Expand Up @@ -184,6 +169,7 @@ pip install pyopengl
pip install pyzmq
pip install scikit-learn
pip install scipy
pip install glfw
pip install git+https://github.com/zeromq/pyre
pip install pupil-apriltags
Expand Down
16 changes: 1 addition & 15 deletions docs/dependencies-ubuntu18.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@ sudo apt install -y libgoogle-glog-dev libatlas-base-dev libeigen3-dev
sudo apt install -y libceres-dev
```

## glfw
Pupil requires glfw v3.3.2, which you can install from source with:
```sh
sudo apt install xorg-dev
git clone https://github.com/glfw/glfw
cd glfw
git checkout 3.3.2
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make
sudo make install
sudo ldconfig
```

## Turbojpeg

```sh
Expand Down Expand Up @@ -95,6 +80,7 @@ pip install pyopengl
pip install pyzmq
pip install scikit-learn
pip install scipy
pip install glfw
pip install git+https://github.com/zeromq/pyre
pip install pupil-apriltags
Expand Down
7 changes: 1 addition & 6 deletions docs/dependencies-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ pip install pyopengl
pip install pyzmq
pip install scikit-learn
pip install scipy
pip install glfw
pip install win_inet_pton
pip install git+https://github.com/zeromq/pyre

Expand Down Expand Up @@ -121,12 +122,6 @@ The following steps require you to store dynamic libraries in the `pupil_externa
- Unzip GLEW in your work dir
- Copy `glew32.dll` to `pupil_external`

#### GLFW

- Download GLFW Windows binaries from [glfw.org](http://www.glfw.org/download.html)
- Unzip GLFW to your work dir
- Copy `glfw3.dll` from `lib-vc2015` to `pupil_external`

#### FFMPEG

- [Download FFMPEG v4.0 Windows **shared** binaries](https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2020-10-12-12-31/ffmpeg-n4.3.1-20-g8a2acdc6da-win64-lgpl-shared-4.3.zip)
Expand Down
Loading

0 comments on commit 70e93bc

Please sign in to comment.