From 43e2de56fa7ca09f79217542f00e7d7d83befabb Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Tue, 4 Jun 2024 14:20:55 -0400 Subject: [PATCH] Make qtpy an optional dependency. --- echo/qt/__init__.py | 7 +++++-- setup.cfg | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/echo/qt/__init__.py b/echo/qt/__init__.py index 21667ca76..2223cc3cd 100644 --- a/echo/qt/__init__.py +++ b/echo/qt/__init__.py @@ -1,2 +1,5 @@ -from .connect import * # noqa -from .autoconnect import * # noqa +try: + from .connect import * # noqa + from .autoconnect import * # noqa +except ImportError: + pass diff --git a/setup.cfg b/setup.cfg index f9b432589..1971a6547 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,7 +28,6 @@ python_requires = >=3.8 setup_requires = setuptools_scm install_requires = numpy - qtpy importlib_metadata; python_version<'3.9' [options.extras_require] @@ -41,4 +40,5 @@ docs = numpydoc sphinx-rtd-theme qt = + qtpy PyQt5>=5.14