Improve custom message handler handling
[jabberbot/examples.git] / setup.py
blob914d90e82161cf349d5d4b64c1af8729ab4b5b03
1 #!/usr/bin/env python
2 # Setup script for python-jabberbot
3 # by Thomas Perl <thp.io/about>
5 from distutils.core import setup
7 import os
8 import re
9 import sys
11 # Make sure that we import the local jabberbot module
12 sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
13 import jabberbot
16 # How is the package going to be called?
17 PACKAGE = 'jabberbot'
19 # List the modules that need to be installed/packaged
20 MODULES = (
21 'jabberbot',
24 # These metadata fields are simply taken from the Jabberbot module
25 VERSION = jabberbot.__version__
26 WEBSITE = jabberbot.__website__
27 LICENSE = jabberbot.__license__
28 DESCRIPTION = jabberbot.__doc__
30 # Extract name and e-mail ("Firstname Lastname <mail@example.org>")
31 AUTHOR, EMAIL = re.match(r'(.*) <(.*)>', jabberbot.__author__).groups()
33 setup(name=PACKAGE,
34 version=VERSION,
35 description=DESCRIPTION,
36 author=AUTHOR,
37 author_email=EMAIL,
38 license=LICENSE,
39 url=WEBSITE,
40 py_modules=MODULES,
41 download_url=WEBSITE+PACKAGE+'-'+VERSION+'.tar.gz')