Skip to content

Conversation

@romanroibu
Copy link
Contributor

@romanroibu romanroibu commented Sep 23, 2020

This PR replaces the internal glfw.py bindings with external pyGLFW.

Install the external bindings using pip:

pip install glfw

ClickUp Task

@romanroibu romanroibu requested review from papr and pfaion September 29, 2020 08:45
@romanroibu romanroibu marked this pull request as ready for review September 29, 2020 08:45
@pfaion
Copy link
Contributor

pfaion commented Sep 29, 2020

@romanroibu can you add pip install glfw to https://github.com/pupil-labs/pupil/blob/master/.travis/run_tests.sh
This should fix the Travis errors hopefully.
Makes sense to add this on this PR I think.

@romanroibu
Copy link
Contributor Author

@pfaion Thanks for reminding me 👍🏻 I added your suggestion, and also updated the dependency documentation.

The only thing I haven't touched is the bundle deployment scripts, but there seem to be useful functions to get the path(s) to the library files. @papr Please let me know if you want me to try to update these; I don't have a lot of experience with PyInstaller, but can take a stab at it.

@romanroibu romanroibu requested a review from pfaion September 30, 2020 08:11
@papr papr force-pushed the pyglfw-external-dependency branch from 3c7a531 to c721b31 Compare September 30, 2020 14:07
@papr
Copy link
Contributor

papr commented Sep 30, 2020

Bundling works. Only issue: There was a case where the clipboard could not be accessed on Windows. Might be a race condition.

@papr
Copy link
Contributor

papr commented Oct 5, 2020

pyGLFW 2.0.0 was just released. Most notably, the default error reporting changed from raise to warn (reasoning).

@pfaion
Copy link
Contributor

pfaion commented Oct 6, 2020

@romanroibu is there not a better version to change ERROR_REPORTING than to change this after every import? This seems somehow very verbose and easy to forget.

@romanroibu
Copy link
Contributor Author

@pfaion for most use-cases it's probably enough to change the ERROR_REPORTING after the imports in the launchables, since the rest of the code runs in the context of a launchable process. However, I'm not sure if no other process is calling any glfw method, so I just added this statement after each import for safety.

I couldn't think of a better way to globally change the error reporting behaviour.

@papr papr merged commit c86514b into develop Oct 9, 2020
@papr papr deleted the pyglfw-external-dependency branch October 9, 2020 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants