#!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import codecs
import os
import re
import sys


# When creating the sdist, make sure the django.mo file also exists:
if 'sdist' in sys.argv:
    try:
        os.chdir('comments_moderation')
        from django.core.management.commands.compilemessages import compile_messages
        compile_messages(sys.stderr)
    finally:
        os.chdir('..')


def read(*parts):
    file_path = path.join(path.dirname(__file__), *parts)
    return codecs.open(file_path, encoding='utf-8').read()


def find_version(*parts):
    version_file = read(*parts)
    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
    if version_match:
        return str(version_match.group(1))
    raise RuntimeError("Unable to find version string.")

setup(
    name='django-comments-moderation',
    version=find_version('comments_moderation', '__init__.py'),
    license='GNU Affero General Public License, Version 3.0',

    install_requires=[
        'django-fluent-comments>=0.9.2',
    ],
    requires=[
        'Django (>=1.3)',
    ],
    description='Moderation plugin for django-fluent-comments',
    long_description=read('README.md'),

    author='Petr Dlouhý',
    author_email='petr.dlouhy@email.cz',

    url='https://github.com/PetrDlouhy/django-comments-moderation',
    download_url='',

    packages=find_packages(exclude=('',)),
    include_package_data=True,

    zip_safe=False,
    classifiers=[
        'Development Status :: 1 - Alpha',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Affero General Public License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        'Topic :: Software Development :: Libraries :: Application Frameworks',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ]
)

@@ -1,8 +1,32 @@
+# -*- coding: utf-8 -*-%0A
 #!/usr/b

fix unicode