Skip to content

Commit

Permalink
Merge pull request #495 from nucleic/qt-extras
Browse files Browse the repository at this point in the history
Add easy ways to install extra dependencies required for some widgets
  • Loading branch information
MatthieuDartiailh committed Jun 13, 2022
2 parents bf1e309 + 9c86c82 commit 7f4f5f4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,20 @@ jobs:
pip install git+https://github.com/MatthieuDartiailh/bytecode@main
pip install git+https://github.com/nucleic/atom@main
pip install git+https://github.com/nucleic/kiwi@main
- name: Install project
- name: Install project (no-extras)
if: matrix.python-version != '3.9'
env:
CPPFLAGS: --coverage
run: |
pip install -e .[qt${{ matrix.qt-version }}-${{ matrix.qt-binding }}]
- name: Install extra dependencies
if: matrix.python-version == '3.9'
- name: Install project (with-extras pyqt)
if: matrix.python-version == '3.9' && matrix.qt-binding == 'pyqt'
run: |
pip install matplotlib ipython qtconsole
- name: Install QScintilla (Qt5)
if: matrix.python-version == '3.9' && matrix.qt-binding == 'pyqt' && matrix.qt-version== 5
pip install -e .[qt${{ matrix.qt-version }}-${{ matrix.qt-binding }},ipython-qt,matplotlib-qt,scintilla-qt${{ matrix.qt-version }}-pyqt,webview-qt${{ matrix.qt-version }}-pyqt]
- name: Install project (with-extras pyside)
if: matrix.python-version == '3.9' && matrix.qt-binding != 'pyqt'
run: |
pip install QScintilla
- name: Install QScintilla (Qt6)
if: matrix.python-version == '3.9' && matrix.qt-binding == 'pyqt' && matrix.qt-version== 6
run: |
pip install PyQt6-QScintilla
pip install -e .[qt${{ matrix.qt-version }}-${{ matrix.qt-binding }},ipython-qt,matplotlib-qt]
- name: Install test requirements
run: |
pip install -r test_requirements.txt
Expand Down
3 changes: 1 addition & 2 deletions enaml/core/declarative_meta.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
# Copyright (c) 2013-2022, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
Expand Down Expand Up @@ -86,7 +86,6 @@ def patch_d_member(member):
"""
metadata = member.metadata
if metadata['d_writable']:
mode, ctxt = member.default_value_mode
handler = DeclarativeDefaultHandler()
handler.delegate = member.clone()
new_mode = DefaultValue.CallObject_ObjectName
Expand Down
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@ dependencies = [
dynamic=["version"]

[project.optional-dependencies]
qt5-pyqt = ["qtpy", "pyqt5"]
qt5-pyqt = ["qtpy", "PyQt5"]
qt5-pyside = ["qtpy", "pyside2"]
qt6-pyqt = ["qtpy>=2.1.0", "pyqt6>=6.2"]
qt6-pyqt = ["qtpy>=2.1.0", "PyQt6>=6.2"]
qt6-pyside = ["qtpy>=2.1.0", "pyside6>=6.2.3"]
scintilla-qt5-pyqt = ["QScintilla"]
scintilla-qt6-pyqt = ["PyQt6-QScintilla"]
matplotlib-qt = ["matplotlib"]
ipython-qt = ["qtconsole"]
webview-qt5-pyqt = ["PyQtWebEngine"]
webview-qt6-pyqt = ["PyQt6-WebEngine"]
vtk-qt = ["vtk"]

[project.urls]
homepage = "https://github.com/nucleic/enaml"
Expand Down

0 comments on commit 7f4f5f4

Please sign in to comment.