Skip to content

readme: separate out the "quick start" so it really is quick #894

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 1 commit into from
Oct 12, 2015
Merged
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
47 changes: 30 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,19 @@ Mypy can be installed using pip:

$ pip install mypy-lang

Depending on your configuration, you may have to use `pip3`
instead:
Now, if Python on your system is configured properly (else see
"Troubleshooting" below), you can type-check a program like this:

$ pip3 install mypy-lang
$ mypy PROGRAM

You can always use a Python interpreter to run your statically typed
programs, even if they have type errors:

$ python3 PROGRAM


Quick start for contributing to mypy
------------------------------------

If you want to contribute, first clone the mypy git repository:

Expand All @@ -79,30 +88,34 @@ the above as root. For example, in Ubuntu and Mac OS X:

$ sudo python3 setup.py install

This installs the `mypy` script and dependencies, including the
`typing` module, to system-dependent locations. Sometimes the script
directory will not be in `PATH`, and you have to add the target
directory to `PATH` manually or create a symbolic link to the script.
In particular, on Mac OS X, the script may be installed under
`/Library/Frameworks`:
Now you can use the `mypy` program just as above. In case of trouble
see "Troubleshooting" below.

/Library/Frameworks/Python.framework/Versions/<version>/bin

Now, on a Unix-like system, you can type check a program like this:
Troubleshooting
---------------

$ mypy PROGRAM
Depending on your configuration, `pip` may correspond to Python 2 and
you may have to use `pip3` instead for installation:

$ pip3 install mypy-lang

If the `mypy` command isn't found after installation: After either
`pip install` or `setup.py install`, the `mypy` script and
dependencies, including the `typing` module, will be installed to
system-dependent locations. Sometimes the script directory will not
be in `PATH`, and you have to add the target directory to `PATH`
manually or create a symbolic link to the script. In particular, on
Mac OS X, the script may be installed under `/Library/Frameworks`:

/Library/Frameworks/Python.framework/Versions/<version>/bin

In Windows, the script is generally installed in
`\PythonNN\Scripts`. So, type check a program like this (replace
`\Python34` with your Python installation path):

C:\>\Python34\python \Python34\Scripts\mypy PROGRAM

You can always use a Python interpreter to run your statically typed
programs, even if they have type errors:

$ python3 PROGRAM


Web site and documentation
--------------------------
Expand Down