Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hooks: add hook for pynput #287

Merged
merged 5 commits into from
Aug 6, 2021
Merged

hooks: add hook for pynput #287

merged 5 commits into from
Aug 6, 2021

Conversation

eric15342335
Copy link
Contributor

Pynput chooses different backends for different platforms, but users can specify via environment variables too.

I am not sure if this is right.

@eric15342335 eric15342335 requested review from a team and Legorooj and removed request for a team August 5, 2021 16:05
@eric15342335
Copy link
Contributor Author

eric15342335 commented Aug 5, 2021

or we can use alternative method like how pynput detects backend

@bwoodsend
Copy link
Member

Hmm, what we're trying to with the matplotlib hook (which also has a choice of backends) is make the selection configurable. In this case it would be to have whatever backend pynput selects by default as the default then have a hook option to choose a backend (or possibly backends if needing more than one is likely?).

@bwoodsend
Copy link
Member

Actually looking at their available backends, this isn't really like matplotlib where you have more choices than you need, it's pretty much just one per OS meaning that your collect_submodules() approach is fine.

@bwoodsend
Copy link
Member

It does have per-platforn dependencies (python-xlib for Linux, pyobjc-framework-Quartz for macOS`) which will likely become warnings on other OSs because they're not installed.

@Legorooj Legorooj removed their request for review August 6, 2021 07:53
Co-authored-by: Brénainn Woodsend <bwoodsend@gmail.com>
@bwoodsend
Copy link
Member

Here's CI and some more CI becuase Linux needs a virtual screen.

@bwoodsend bwoodsend merged commit 13632ff into pyinstaller:master Aug 6, 2021
@bwoodsend
Copy link
Member

Cheers @eric15342335!

@eric15342335 eric15342335 deleted the hook-pynput branch August 7, 2021 12:02
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.

2 participants