From 0db79b72d69cf96aba792c722518ee6cc023f244 Mon Sep 17 00:00:00 2001 From: Justin Crawford Date: Thu, 9 Dec 2021 16:59:38 -0800 Subject: [PATCH] Fix a dependency problem when installing on fresh installs --- spamprotection/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/spamprotection/__init__.py b/spamprotection/__init__.py index 561f776..d9321dc 100644 --- a/spamprotection/__init__.py +++ b/spamprotection/__init__.py @@ -1,4 +1,9 @@ """Initial Directory.""" -from .client import SPBClient # noqa: F401 - __version__ = "0.1.1" + +try: + from .client import SPBClient # noqa: F401 +except ModuleNotFoundError: + # in setup.py, this import will cause problems + # because dependencies aren't always installed + pass