forked from lyda/misspell-check
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
executable file
·66 lines (53 loc) · 1.91 KB
/
setup.py
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
#!/usr/bin/env python
"""Installer for misspelling-check.
This installs the misspelling command and the misspellings.check module.
"""
import ast
import sys
from distutils.core import Command
from distutils.core import setup
import unittest
def version():
"""Return version string."""
with open('misspellings_lib/__init__.py') as input_file:
for line in input_file:
if line.startswith('__version__'):
return ast.parse(line).body[0].value.s
class TestCommand(Command):
description = 'Runs all available tests.'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
tests = unittest.TestLoader().discover('tests')
runner = unittest.TextTestRunner(verbosity=2)
result = runner.run(tests)
if not result.wasSuccessful():
sys.exit(1)
with open('README.rst') as readme:
setup(
cmdclass={'test': TestCommand},
name='misspellings',
version=version(),
url='https://github.com/lyda/misspell-check',
author='Kevin Lyda',
author_email='[email protected]',
description='A tool to detect misspellings',
long_description=readme.read(),
packages=['misspellings_lib'],
package_data={'misspellings_lib': ['custom.json', 'wikipedia.json']},
scripts=['misspellings', ],
keywords='check, code, spelling, spellcheck',
license='GNU General Public License v3',
platforms=['POSIX'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Utilities'
])