From cdabada763b25921b9ee2655eed4113000a604dd Mon Sep 17 00:00:00 2001 From: Greg Price Date: Wed, 7 Oct 2015 15:02:51 -0700 Subject: [PATCH] readme: separate out the "quick start" so it really is quick --- README.md | 47 ++++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index d5f216f161dc..4199fefb8c3a 100644 --- a/README.md +++ b/README.md @@ -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: @@ -79,18 +88,27 @@ 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//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//bin In Windows, the script is generally installed in `\PythonNN\Scripts`. So, type check a program like this (replace @@ -98,11 +116,6 @@ In Windows, the script is generally installed in 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 --------------------------