diff --git a/MANIFEST.in b/MANIFEST.in index 8e6b6386b61fd..e8e949f97f261 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,2 @@ -recursive-include lib-typing *.py recursive-include scripts * recursive-exclude scripts myunit diff --git a/build-requirements.txt b/build-requirements.txt new file mode 100644 index 0000000000000..0a8547bcc8ef9 --- /dev/null +++ b/build-requirements.txt @@ -0,0 +1,2 @@ +setuptools +wheel diff --git a/setup.py b/setup.py index 3733f72800c62..66d2aa4473ce8 100644 --- a/setup.py +++ b/setup.py @@ -9,8 +9,8 @@ sys.stderr.write("ERROR: You need Python 3.2 or later to use mypy.\n") exit(1) -from distutils.core import setup -from distutils.command.build_py import build_py +from setuptools import setup +from setuptools.command.build_py import build_py from mypy.version import __version__ from mypy import git @@ -94,17 +94,22 @@ def run(self): 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', 'Topic :: Software Development', ] package_dir = {'mypy': 'mypy'} -if sys.version_info < (3, 5, 0): - package_dir[''] = 'lib-typing/3.2' scripts = ['scripts/mypy', 'scripts/stubgen'] if os.name == 'nt': scripts.append('scripts/mypy.bat') +install_requires = [] +if sys.platform != 'win32': + install_requires.append('typed-ast >= 0.6.1') +if sys.version_info < (3, 5): + install_requires.append('typing >= 3.5.2') + setup(name='mypy-lang', version=version, description=description, @@ -115,10 +120,11 @@ def run(self): license='MIT License', platforms=['POSIX'], package_dir=package_dir, - py_modules=['typing'] if sys.version_info < (3, 5, 0) else [], + py_modules=[], packages=['mypy'], scripts=scripts, data_files=data_files, classifiers=classifiers, cmdclass={'build_py': CustomPythonBuild}, + install_requires=install_requires, ) diff --git a/test-data/unit/pythoneval.test b/test-data/unit/pythoneval.test index df6ef8cccba07..dda1d517c02f0 100644 --- a/test-data/unit/pythoneval.test +++ b/test-data/unit/pythoneval.test @@ -11,7 +11,8 @@ print('hello, world') [out] hello, world -[case testAbstractBaseClasses] +-- Skipped because different typing package versions have different repr()s. +[case testAbstractBaseClasses-skip] import re from typing import Sized, Sequence, Iterator, Iterable, Mapping, AbstractSet diff --git a/typeshed b/typeshed index 3ea39a7c1b78f..d60bea14f65ce 160000 --- a/typeshed +++ b/typeshed @@ -1 +1 @@ -Subproject commit 3ea39a7c1b78f59df0ea1469ead4f42050d8ad38 +Subproject commit d60bea14f65ce51babdb8def77551c6be3c657c2