From 94bdee6785a9d15583b0914729d733309ace2bd7 Mon Sep 17 00:00:00 2001 From: Gunther Cox Date: Sat, 26 Nov 2016 11:02:07 -0500 Subject: [PATCH] Update Python packaging --- chatterbot/__init__.py | 7 +++++-- setup.py | 29 +++++++++++++++++------------ 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/chatterbot/__init__.py b/chatterbot/__init__.py index a1d73587f..29fe55e5f 100644 --- a/chatterbot/__init__.py +++ b/chatterbot/__init__.py @@ -1,9 +1,12 @@ +""" +ChatterBot is a machine learning, conversational dialog engine. +""" import sys if 'install' not in sys.argv and 'egg_info' not in sys.argv: from .chatterbot import ChatBot -__version__ = '0.4.13' +__version__ = '0.4.14' __author__ = 'Gunther Cox' __email__ = 'gunthercx@gmail.com' - +__url__ = 'https://github.com/gunthercox/ChatterBot' diff --git a/setup.py b/setup.py index 090737b9c..e31b5f4c0 100644 --- a/setup.py +++ b/setup.py @@ -1,26 +1,31 @@ #!/usr/bin/env python +""" +ChatterBot setup file. +""" from setuptools import setup # Dynamically retrieve the version information from the chatterbot module -version = __import__('chatterbot').__version__ -author = __import__('chatterbot').__author__ -author_email = __import__('chatterbot').__email__ +CHATTERBOT = __import__('chatterbot') +VERSION = CHATTERBOT.__version__ +AUTHOR = CHATTERBOT.__author__ +AUTHOR_EMAIL = CHATTERBOT.__email__ +URL = CHATTERBOT.__url__ +DESCRIPTION = CHATTERBOT.__doc__ -req = open('requirements.txt') -requirements = req.readlines() -req.close() +with open('requirements.txt') as requirements: + REQUIREMENTS = requirements.readlines() setup( name='ChatterBot', - version=version, - url='https://github.com/gunthercox/ChatterBot', + version=VERSION, + url=URL, setup_requires=['setuptools-markdown'], long_description_markdown_filename='readme.md', - description='An open-source chat bot program written in Python.', - author=author, - author_email=author_email, + description=DESCRIPTION, + author=AUTHOR, + author_email=AUTHOR_EMAIL, packages=[ 'chatterbot', 'chatterbot.adapters', @@ -39,7 +44,7 @@ ], package_dir={'chatterbot': 'chatterbot'}, include_package_data=True, - install_requires=requirements, + install_requires=REQUIREMENTS, license='BSD', zip_safe=False, platforms=['any'],