Skip to content

Commit

Permalink
MRG: Adding new variants to select the desired Qt binding (#12628)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Larson <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored May 30, 2024
1 parent d6a58cb commit 7f2c931
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
4 changes: 4 additions & 0 deletions doc/changes/devel/12628.newfeature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
We added new installation variants for a full installation with the PySide6 Qt binding
(``"mne[full-pyside6]"``), with the PyQt6 binding (``"mne[full-pyqt6]"``, equivalent to
``"mne[full]"``), and without any Qt binding (``"mne[full-no-qt]"``), which may be useful
in certain situations by `Richard Höchenberger`_.
12 changes: 12 additions & 0 deletions doc/install/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ development version of MNE-Python. If you plan to contribute to MNE-Python, or
just prefer to use git rather than pip to make frequent updates, there are
instructions for installing from a ``git clone`` in the :ref:`contributing`.

Choosing the Qt framework
^^^^^^^^^^^^^^^^^^^^^^^^^

The ``conda-forge`` version of MNE-Python ships with PyQt5. If you would like to
use a different binding, you can instead install MNE-Python via ``pip``:

.. code-block:: console
$ pip install "mne[full]" # uses PyQt6
$ pip install "mne[full-pyqt6]" # same as above
$ pip install "mne[full-pyside6]" # use PySide6
$ pip install "mne[full-no-qt]" # don't install any Qt binding
.. _CUDA:

Expand Down
12 changes: 9 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ data = []
hdf5 = ["h5io", "pymatreader"]

# Dependencies for full MNE-Python functionality (other than raw/epochs export)
full = [
# We first define a variant without any Qt bindings. The "complete" variant, mne[full],
# makes an opinionated choice and installs PyQt6.
# We also offter two more variants: mne[full-qt6] (which is equivalent to mne[full]),
# and mne[full-pyside6], which will install PySide6 instead of PyQt6.
full-no-qt = [
"mne[hdf5]",
"qtpy",
"PyQt6!=6.6.0",
"PyQt6-Qt6!=6.6.0,!=6.7.0",
"pyobjc-framework-Cocoa>=5.2.0; platform_system=='Darwin'",
"sip",
"scikit-learn",
Expand Down Expand Up @@ -106,6 +108,10 @@ full = [
"defusedxml",
"neo",
]
full = ["mne[full-no-qt]", "PyQt6!=6.6.0", "PyQt6-Qt6!=6.6.0,!=6.7.0"]
full-pyqt6 = ["mne[full]"]
full-pyside6 = ["mne[full-no-qt]", "PySide6"]


# Dependencies for running the test infrastructure
test = [
Expand Down

0 comments on commit 7f2c931

Please sign in to comment.