summaryrefslogtreecommitdiff
path: root/setup.py
blob: 489ebed57f21f18484f626a834a22d786365f771 (plain)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env python
# std imports,
import subprocess
import sys
import os

# 3rd-party
import setuptools
import setuptools.command.develop
import setuptools.command.test

here = os.path.dirname(__file__)


class SetupDevelop(setuptools.command.develop.develop):
    def run(self):
        # ensure a virtualenv is loaded,
        assert os.getenv('VIRTUAL_ENV'), 'You should be in a virtualenv'
        # ensure tox is installed
        subprocess.check_call(('pip', 'install', 'tox', 'ipython'))
        # install development egg-link
        setuptools.command.develop.develop.run(self)


class SetupTest(setuptools.command.test.test):
    def run(self):
        self.spawn(('tox',))


def main():
    extra = {
        'install_requires': [
            'wcwidth>=0.1.0',
        ]
    }
    if sys.version_info < (2, 7,):
        extra['install_requires'].extend(['ordereddict>=1.1'])

    setuptools.setup(
        name='blessed',
        version='1.9.5',
        description="A feature-filled fork of Erik Rose's blessings project",
        long_description=open(os.path.join(here, 'README.rst')).read(),
        author='Jeff Quast',
        author_email='contact@jeffquast.com',
        license='MIT',
        packages=['blessed', 'blessed.tests'],
        url='https://github.com/jquast/blessed',
        include_package_data=True,
        test_suite='blessed.tests',
        classifiers=[
            'Intended Audience :: Developers',
            'Natural Language :: English',
            'Development Status :: 5 - Production/Stable',
            'Environment :: Console',
            'Environment :: Console :: Curses',
            'License :: OSI Approved :: MIT License',
            'Operating System :: POSIX',
            'Programming Language :: Python :: 2',
            'Programming Language :: Python :: 2.6',
            'Programming Language :: Python :: 2.7',
            'Programming Language :: Python :: 3',
            'Programming Language :: Python :: 3.2',
            'Programming Language :: Python :: 3.3',
            'Programming Language :: Python :: 3.4',
            'Topic :: Software Development :: Libraries',
            'Topic :: Software Development :: User Interfaces',
            'Topic :: Terminals'
        ],
        keywords=['terminal', 'sequences', 'tty', 'curses', 'ncurses',
                  'formatting', 'style', 'color', 'console', 'keyboard',
                  'ansi', 'xterm'],
        cmdclass={'develop': SetupDevelop,
                  'test': SetupTest},
        **extra
    )

if __name__ == '__main__':
    main()