aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
blob: ccaec0425e6089b1461eaef3aaca288ba0bf135b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from distutils.core import setup, Command
import unittest

import gg_scraper


class RunTests(Command):
    """New setup.py command to run all tests for the package.
    """
    description = "run all tests for the package"

    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        tests = unittest.TestLoader().discover('test')
        runner = unittest.TextTestRunner(verbosity=2)
        runner.run(tests)


classifiers = [
    'Development Status :: 3 - Alpha',
    'Operating System :: OS Independent',
    'Intended Audience :: Information Technology',
    'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
    'Natural Language :: English',
    'Programming Language :: Python :: 2',
    'Programming Language :: Python :: 3',
    'Topic :: Communications :: Email',
    'Topic :: Communications :: Conferencing']


def get_long_description():
    lines = open('README.rst').read().splitlines(False)
    return '\n' + '\n'.join(lines) + '\n'

setup(name='gg_scraper',
      version=gg_scraper.__version__,
      description='Download a Google Group to MBOX',
      long_description=get_long_description(),
      author='Matěj Cepl',
      author_email='mcepl@cepl.eu',
      url='http://luther.ceplovi.cz/git/gg_scraper.git',
      scripts=['gg_scraper.py'],
      keywords=['email', 'Google Groups', 'scrap', 'backup'],
      license='GNU GPL',
      classifiers=classifiers,
      cmdclass={
          'test': RunTests,
      },
      requires=['beautifulsoup4', 'PyYAML'])