2 from distutils.core import setup
\r
5 # Figure out the version; this could be done by importing the
\r
6 # module, though that requires Django to be already installed,
\r
7 # which may not be the case when processing a pip requirements
\r
10 here = os.path.dirname(os.path.abspath(__file__))
\r
11 version_re = re.compile(
\r
12 r'__version__ = (\(.*?\))')
\r
13 fp = open(os.path.join(here, 'django_tables', '__init__.py'))
\r
16 match = version_re.search(line)
\r
18 version = eval(match.group(1))
\r
21 raise Exception("Cannot find version in __init__.py")
\r
25 def find_packages(root):
\r
26 # so we don't depend on setuptools; from the Storm ORM setup.py
\r
28 for directory, subdirectories, files in os.walk(root):
\r
29 if '__init__.py' in files:
\r
30 packages.append(directory.replace(os.sep, '.'))
\r
35 name = 'django-tables',
\r
36 version=".".join(map(str, version)),
\r
37 description = 'Render QuerySets as tabular data in Django.',
\r
38 author = 'Michael Elsdoerfer',
\r
39 author_email = 'michael@elsdoerfer.info',
\r
41 url = 'http://launchpad.net/django-tables',
\r
43 'Development Status :: 3 - Alpha',
\r
44 'Environment :: Web Environment',
\r
45 'Framework :: Django',
\r
46 'Intended Audience :: Developers',
\r
47 'License :: OSI Approved :: BSD License',
\r
48 'Operating System :: OS Independent',
\r
49 'Programming Language :: Python',
\r
50 'Topic :: Internet :: WWW/HTTP',
\r
51 'Topic :: Software Development :: Libraries',
\r
53 packages = find_packages('django_tables'),
\r