Skip to content

Create mypy_extensions package. #2228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions extensions/README.md
Original file line number Diff line number Diff line change
@@ -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.

10 changes: 10 additions & 0 deletions extensions/mypy_extensions.py
Original file line number Diff line number Diff line change
@@ -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)
44 changes: 44 additions & 0 deletions extensions/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/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'
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()

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',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development',
]

setup(
name='mypy_extensions',
version=version,
description=description,
long_description=long_description,
author='David Foster',
author_email='[email protected]',
url='http://www.mypy-lang.org/',
license='MIT License',
platforms=['POSIX'],
py_modules=['mypy_extensions'],
classifiers=classifiers,
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This setup() call has all the same keys as the one in setup.py for mypy with one exception: There is no cmdclass key. I wasn't able to prove that it made sense here, so I did not include it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call.