diff --git a/neotime/__init__.py b/neotime/__init__.py index c8fbfcf..7960989 100644 --- a/neotime/__init__.py +++ b/neotime/__init__.py @@ -27,7 +27,13 @@ from re import compile as re_compile from time import gmtime, mktime, struct_time -from pytz import FixedOffset +##Just ensures that module can be imported on install, becuase offset is not needed when importing while install. +##After the install it should work every time, cause pytz is installed with the packge. +try: + from pytz import FixedOffset +except: + def FixedOffset(): + raise Exception("I seems like pytz is not installed or there is an error with your pytz installation. Please reinstall pytz.") try: diff --git a/setup.py b/setup.py index c5339b0..829a268 100644 --- a/setup.py +++ b/setup.py @@ -30,6 +30,7 @@ from neotime.meta import package, version + install_requires = [ "pytz", "six",