Skip to content

Commit cdabada

Browse files
committed
readme: separate out the "quick start" so it really is quick
1 parent dcff596 commit cdabada

File tree

1 file changed

+30
-17
lines changed

1 file changed

+30
-17
lines changed

README.md

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,19 @@ Mypy can be installed using pip:
6161

6262
$ pip install mypy-lang
6363

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

67-
$ pip3 install mypy-lang
67+
$ mypy PROGRAM
68+
69+
You can always use a Python interpreter to run your statically typed
70+
programs, even if they have type errors:
71+
72+
$ python3 PROGRAM
73+
74+
75+
Quick start for contributing to mypy
76+
------------------------------------
6877

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

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

8089
$ sudo python3 setup.py install
8190

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

89-
/Library/Frameworks/Python.framework/Versions/<version>/bin
9094

91-
Now, on a Unix-like system, you can type check a program like this:
95+
Troubleshooting
96+
---------------
9297

93-
$ mypy PROGRAM
98+
Depending on your configuration, `pip` may correspond to Python 2 and
99+
you may have to use `pip3` instead for installation:
100+
101+
$ pip3 install mypy-lang
102+
103+
If the `mypy` command isn't found after installation: After either
104+
`pip install` or `setup.py install`, the `mypy` script and
105+
dependencies, including the `typing` module, will be installed to
106+
system-dependent locations. Sometimes the script directory will not
107+
be in `PATH`, and you have to add the target directory to `PATH`
108+
manually or create a symbolic link to the script. In particular, on
109+
Mac OS X, the script may be installed under `/Library/Frameworks`:
110+
111+
/Library/Frameworks/Python.framework/Versions/<version>/bin
94112

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

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

101-
You can always use a Python interpreter to run your statically typed
102-
programs, even if they have type errors:
103-
104-
$ python3 PROGRAM
105-
106119

107120
Web site and documentation
108121
--------------------------

0 commit comments

Comments
 (0)