Skip to content

Commit

Permalink
Stop installation on Python < 3
Browse files Browse the repository at this point in the history
  • Loading branch information
gunthercox committed Feb 1, 2019
1 parent 16552ef commit 17a49bb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
"""
ChatterBot setup file.
"""
import sys
import platform
from setuptools import setup


if sys.version_info[0] < 3:
raise Exception(
'You are tying to install ChatterBot on Python version {}.\n'
'Please install ChatterBot in Python 3 instead.'.format(
platform.python_version()
)
)

# Dynamically retrieve the version information from the chatterbot module
CHATTERBOT = __import__('chatterbot')
VERSION = CHATTERBOT.__version__
Expand Down

0 comments on commit 17a49bb

Please sign in to comment.