-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Choose Qt binding to install from SPYDER_QT_BINDING
environment variable
#23055
Conversation
Hello @dpizetta! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2024-12-02 16:48:07 UTC |
This is something I thought about as well while working on PR #23118. I really like the proposal: Things work by default, users have the option to chose a binding and only a single binding is installed. Other options I came up with have drawbacks:
[1] #20201 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work on this @dpizetta! Some small suggestions for you, the rest looks good to me.
Also, do you need help to fix the failing test?
SPYDER_QT_BINDING
environment variable
Thank you for taking a look! It should be OK after these changes. I may need some help with the AST errors. Thanks |
Also, fix small style issue in setup.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now, thanks @dpizetta!
@meeseeksdev please backport to 6.x |
…SPYDER_QT_BINDING` environment variable
…om `SPYDER_QT_BINDING` environment variable) (#23142)
Description of Changes
This is a proposal to allow the user to choose the Qt binding to be installed when installing with PIP.
for example using PyQt6 (or PySide6 in the future).
Since the we could not rely on having other imports other than
stdlib
available onsetup.py
when building and installing, we could not test if there is a binding already installed. For example, we could useQtPy
to identify which one was installed, including it tosetup_requires
, and asking forqtpy.QT_API. But, also without success.
After testing some other ways to do that, I have implemented this version that checks the SPYDER_QT_BINDING environment variable to proper set the requirement during installation.
We can use like this:
SPYDER_QT_BINDING='pyqt6' pip install spyder
This is also compatible with test environments, where you can set the variable.
Not sure if this useful for
conda
also, I'm not familiar with it.I want to hear from you guys, let me know your thoughts.
Links related to setup imports:
Issue(s) Resolved
Part of #20201
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: dpizetta