From a8cf5ab88c2e47de3f7456a870ca09965d7d5b00 Mon Sep 17 00:00:00 2001 From: David Foster Date: Thu, 13 Oct 2016 18:50:26 -0700 Subject: [PATCH 1/2] Create mypy_extensions package. --- extensions/README.md | 6 +++++ extensions/mypy_extensions.py | 0 extensions/setup.py | 47 +++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 extensions/README.md create mode 100644 extensions/mypy_extensions.py create mode 100644 extensions/setup.py diff --git a/extensions/README.md b/extensions/README.md new file mode 100644 index 000000000000..73b786b66b6f --- /dev/null +++ b/extensions/README.md @@ -0,0 +1,6 @@ +Mypy Extensions +=============== + +The "mypy_extensions" module defines experimental extensions to the +standard "typing" module that are supported by the mypy typechecker. + diff --git a/extensions/mypy_extensions.py b/extensions/mypy_extensions.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/extensions/setup.py b/extensions/setup.py new file mode 100644 index 000000000000..143d3db8340d --- /dev/null +++ b/extensions/setup.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python + +from distutils.core import setup + +version = '0.1-dev' +description = 'Experimental type system extensions for programs checked with the mypy typechecker.' +long_description = ''' +Mypy Extensions +=============== + +The "mypy_extensions" module defines experimental extensions to the +standard "typing" module that are supported by the mypy typechecker. +'''.lstrip() + +# MyPy classifiers are copied from ../setup.py +_mypy_classifiers = [ + 'Development Status :: 2 - Pre-Alpha', + 'Environment :: Console', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Operating System :: POSIX', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Topic :: Software Development', +] + +classifiers = _mypy_classifiers + [ + # Support Python 2.7 in addition to Python 3.x + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', +] + +setup( + name='mypy_extensions', + version=version, + description=description, + long_description=long_description, + author='David Foster', + author_email='david@dafoster.net', + url='http://www.mypy-lang.org/', + license='MIT License', + platforms=['POSIX'], + py_modules=['mypy_extensions'], + classifiers=classifiers, +) From 518a70f7b9e7211650adaa5b5a6d61f859f39276 Mon Sep 17 00:00:00 2001 From: David Foster Date: Fri, 14 Oct 2016 18:05:33 -0700 Subject: [PATCH 2/2] Merge classifiers. Improve docs. --- extensions/mypy_extensions.py | 10 ++++++++++ extensions/setup.py | 13 +++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/extensions/mypy_extensions.py b/extensions/mypy_extensions.py index e69de29bb2d1..459d691f65ac 100644 --- a/extensions/mypy_extensions.py +++ b/extensions/mypy_extensions.py @@ -0,0 +1,10 @@ +"""Defines experimental extensions to the standard "typing" module that are +supported by the mypy typechecker. + +Example usage: + from mypy_extensions import TypedDict +""" + +# NOTE: This module must support Python 2.7 in addition to Python 3.x + +# (TODO: Declare TypedDict and other extensions here) diff --git a/extensions/setup.py b/extensions/setup.py index 143d3db8340d..aee20d0443f3 100644 --- a/extensions/setup.py +++ b/extensions/setup.py @@ -1,5 +1,7 @@ #!/usr/bin/env python +# NOTE: This package must support Python 2.7 in addition to Python 3.x + from distutils.core import setup version = '0.1-dev' @@ -12,13 +14,14 @@ standard "typing" module that are supported by the mypy typechecker. '''.lstrip() -# MyPy classifiers are copied from ../setup.py -_mypy_classifiers = [ +classifiers = [ 'Development Status :: 2 - Pre-Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: POSIX', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', @@ -26,12 +29,6 @@ 'Topic :: Software Development', ] -classifiers = _mypy_classifiers + [ - # Support Python 2.7 in addition to Python 3.x - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', -] - setup( name='mypy_extensions', version=version,