Don't require webob as dependency
[mediagoblin.git] / docs / source / build / mediagoblin-licenses / setup.py
1 #!/usr/bin/env python
2 from distutils.core import setup
3 import re
4
5 from sys import version
6 assert version >= '2.6', 'This package requires python 2.6 at least. Sorry.'
7
8 def get_version():
9 """Parse __init__.py for version info, we cannot import it"""
10 version_re = re.compile(r'\s*__VERSION__\s*=\s*("|\')([\w\.\+]+)(\1)')
11 with open('mediagoblin_licenses/__init__.py', 'rt') as file:
12 for line in file:
13 if version_re.match(line):
14 return version_re.match(line).group(2)
15 __VERSION__ = get_version()
16
17
18 setup(name='mediagoblin-licenses',
19 version=__VERSION__,
20 description='Customize the licenses for your mediagoblin installation',
21 author='Sebastian Spaeth',
22 author_email='Sebastian@SSpaeth.de',
23 url='https://gitorious.org/mediagoblin-licenses/mediagoblin-licenses',
24 download_url='https://gitorious.org/mediagoblin-licenses/mediagoblin-licenses/archive-tarball/mediagoblin-licenses-v' + __VERSION__,
25 # http://bugs.python.org/issue13943. Must not be unicode...
26 packages=['mediagoblin_licenses'],
27 package_data = {'mediagoblin_licenses': ['README.rst', 'COPYING']},
28 license=(b'License :: OSI Approved :: GNU Affero General Public License '
29 b'v3 or later (AGPLv3+)')
30 )