2 # Setup script for python-jabberbot
3 # by Thomas Perl <thp.io/about>
5 from distutils
.core
import setup
9 jabberbot_py
= open('jabberbot.py').read()
10 metadata
= dict(re
.findall("__([a-z]+)__ = '([^']+)'", jabberbot_py
))
11 docstrings
= re
.findall('"""(.*)"""', jabberbot_py
)
13 # How is the package going to be called?
16 # List the modules that need to be installed/packaged
21 # Metadata fields extracted from jabberbot.py
22 AUTHOR_EMAIL
= metadata
['author']
23 VERSION
= metadata
['version']
24 WEBSITE
= metadata
['website']
25 LICENSE
= metadata
['license']
26 DESCRIPTION
= docstrings
[0]
28 # Extract name and e-mail ("Firstname Lastname <mail@example.org>")
29 AUTHOR
, EMAIL
= re
.match(r
'(.*) <(.*)>', AUTHOR_EMAIL
).groups()
33 description
=DESCRIPTION
,
39 download_url
=WEBSITE
+PACKAGE
+'-'+VERSION
+'.tar.gz')