forked from python/mypy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
63 lines (53 loc) · 1.8 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
#!/usr/bin/env python
import glob
import os
import os.path
import sys
from distutils.core import setup
if sys.version_info < (3, 2, 0):
sys.stderr.write("ERROR: You need Python 3.2 or later to use mypy.\n")
exit(1)
version = '0.0.1.dev1'
description = 'Optional static type checker for Python'
long_description = '''
Mypy -- Optional Static Type Checker for Python
===============================================
Mypy lets you add type annotations to Python programs, type check them
without running them, and run the programs using a standard Python 3
interpreter.
'''.lstrip()
stubs = []
for version in ['3.2', '2.7']:
base = os.path.join('stubs', version)
stub_dirs = [''] + [name for name in os.listdir(base)
if os.path.isdir(os.path.join(base, name))]
for stub_dir in stub_dirs:
target = os.path.join('lib', 'mypy', 'stubs', version, stub_dir)
files = glob.glob(os.path.join(base, stub_dir, '*.py'))
stubs.append((target, files))
classifiers = [
'Development Status :: 2 - Pre-Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Topic :: Software Development',
]
setup(name='mypy',
version=version,
description=description,
long_description=long_description,
author='Jukka Lehtosalo',
author_email='jukka.lehtosalo@iki.fi',
url='http://www.mypy-lang.org/',
license='MIT License',
platforms=['POSIX'],
package_dir={'': 'lib-typing/3.2', 'mypy': 'mypy'},
py_modules=['typing'],
packages=['mypy'],
scripts=['scripts/mypy'],
data_files=stubs,
classifiers=classifiers,
)