From 0933c401793dbc6bb485294def6f6a75f3abc6c1 Mon Sep 17 00:00:00 2001 From: Zearin Date: Thu, 20 Mar 2014 09:13:15 -0400 Subject: [PATCH 1/6] Move command reference to COMMANDS.md --- COMMANDS.md | 248 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 241 +------------------------------------------------- 2 files changed, 249 insertions(+), 240 deletions(-) create mode 100644 COMMANDS.md diff --git a/COMMANDS.md b/COMMANDS.md new file mode 100644 index 00000000..685cfc33 --- /dev/null +++ b/COMMANDS.md @@ -0,0 +1,248 @@ +# Command Reference + +Like `git`, the `pyenv` command delegates to subcommands based on its +first argument. + +The most common subcommands are: + +* [pyenv local](#pyenv-local) +* [pyenv global](#pyenv-global) +* [pyenv shell](#pyenv-shell) +* [pyenv versions](#pyenv-versions) +* [pyenv version](#pyenv-version) +* [pyenv rehash](#pyenv-rehash) +* [pyenv which](#pyenv-which) +* [pyenv whence](#pyenv-whence) + + + +## pyenv local + +Sets a local application-specific Python version by writing the version +name to a `.python-version` file in the current directory. This version +overrides the global version, and can be overridden itself by setting +the `PYENV_VERSION` environment variable or with the `pyenv shell` +command. + + $ pyenv local 2.7.6 + +When run without a version number, `pyenv local` reports the currently +configured local version. You can also unset the local version: + + $ pyenv local --unset + +Previous versions of pyenv stored local version specifications in a +file named `.pyenv-version`. For backwards compatibility, pyenv will +read a local version specified in an `.pyenv-version` file, but a +`.python-version` file in the same directory will take precedence. + + +### pyenv local (advanced) + +You can specify multiple versions as local Python at once. + +Let's say if you have two versions of 2.7.6 and 3.3.3. If you prefer 2.7.6 over 3.3.3, + + $ pyenv local 2.7.6 3.3.3 + $ pyenv versions + system + * 2.7.6 (set by /Users/yyuu/path/to/project/.python-version) + * 3.3.3 (set by /Users/yyuu/path/to/project/.python-version) + $ python --version + Python 2.7.6 + $ python2.7 --version + Python 2.7.6 + $ python3.3 --version + Python 3.3.3 + +or, if you prefer 3.3.3 over 2.7.6, + + $ pyenv local 3.3.3 2.7.6 + $ pyenv versions + system + * 2.7.6 (set by /Users/yyuu/path/to/project/.python-version) + * 3.3.3 (set by /Users/yyuu/path/to/project/.python-version) + venv27 + $ python --version + Python 3.3.3 + $ python2.7 --version + Python 2.7.6 + $ python3.3 --version + Python 3.3.3 + + +## pyenv global + +Sets the global version of Python to be used in all shells by writing +the version name to the `~/.pyenv/version` file. This version can be +overridden by an application-specific `.python-version` file, or by +setting the `PYENV_VERSION` environment variable. + + $ pyenv global 2.7.6 + +The special version name `system` tells pyenv to use the system Python +(detected by searching your `$PATH`). + +When run without a version number, `pyenv global` reports the +currently configured global version. + + +### pyenv global (advanced) + +You can specify multiple versions as global Python at once. + +Let's say if you have two versions of 2.7.6 and 3.3.3. If you prefer 2.7.6 over 3.3.3, + + $ pyenv global 2.7.6 3.3.3 + $ pyenv versions + system + * 2.7.6 (set by /Users/yyuu/.pyenv/version) + * 3.3.3 (set by /Users/yyuu/.pyenv/version) + $ python --version + Python 2.7.6 + $ python2.7 --version + Python 2.7.6 + $ python3.3 --version + Python 3.3.3 + +or, if you prefer 3.3.3 over 2.7.6, + + $ pyenv global 3.3.3 2.7.6 + $ pyenv versions + system + * 2.7.6 (set by /Users/yyuu/.pyenv/version) + * 3.3.3 (set by /Users/yyuu/.pyenv/version) + venv27 + $ python --version + Python 3.3.3 + $ python2.7 --version + Python 2.7.6 + $ python3.3 --version + Python 3.3.3 + + +## pyenv shell + +Sets a shell-specific Python version by setting the `PYENV_VERSION` +environment variable in your shell. This version overrides +application-specific versions and the global version. + + $ pyenv shell pypy-2.2.1 + +When run without a version number, `pyenv shell` reports the current +value of `PYENV_VERSION`. You can also unset the shell version: + + $ pyenv shell --unset + +Note that you'll need pyenv's shell integration enabled (step 3 of +the installation instructions) in order to use this command. If you +prefer not to use shell integration, you may simply set the +`PYENV_VERSION` variable yourself: + + $ export PYENV_VERSION=pypy-2.2.1 + + +### pyenv shell (advanced) + +You can specify multiple versions via `PYENV_VERSION` at once. + +Let's say if you have two versions of 2.7.6 and 3.3.3. If you prefer 2.7.6 over 3.3.3, + + $ pyenv shell 2.7.6 3.3.3 + $ pyenv versions + system + * 2.7.6 (set by PYENV_VERSION environment variable) + * 3.3.3 (set by PYENV_VERSION environment variable) + $ python --version + Python 2.7.6 + $ python2.7 --version + Python 2.7.6 + $ python3.3 --version + Python 3.3.3 + +or, if you prefer 3.3.3 over 2.7.6, + + $ pyenv shell 3.3.3 2.7.6 + $ pyenv versions + system + * 2.7.6 (set by PYENV_VERSION environment variable) + * 3.3.3 (set by PYENV_VERSION environment variable) + venv27 + $ python --version + Python 3.3.3 + $ python2.7 --version + Python 2.7.6 + $ python3.3 --version + Python 3.3.3 + + +## pyenv versions + +Lists all Python versions known to pyenv, and shows an asterisk next to +the currently active version. + + $ pyenv versions + 2.5.6 + 2.6.8 + * 2.7.6 (set by /home/yyuu/.pyenv/version) + 3.3.3 + jython-2.5.3 + pypy-2.2.1 + + +## pyenv version + +Displays the currently active Python version, along with information on +how it was set. + + $ pyenv version + 2.7.6 (set by /home/yyuu/.pyenv/version) + + +## pyenv rehash + +Installs shims for all Python binaries known to pyenv (i.e., +`~/.pyenv/versions/*/bin/*`). Run this command after you install a new +version of Python, or install a package that provides binaries. + + $ pyenv rehash + + +## pyenv which + +Displays the full path to the executable that pyenv will invoke when +you run the given command. + + $ pyenv which python3.3 + /home/yyuu/.pyenv/versions/3.3.3/bin/python3.3 + + +## pyenv whence + +Lists all Python versions with the given command installed. + + $ pyenv whence 2to3 + 2.6.8 + 2.7.6 + 3.3.3 + + +## pyenv install + +Part of [Python-build](https://github.com/yyuu/pyenv/tree/master/plugins/python-build), this installs versions of python + + $ pyenv install 2.7.6 + $ pyenv install 2.6.8 + $ pyenv versions + system + 2.6.8 + * 2.7.6 (set by /home/yyuu/.pyenv/version) + + +## pyenv install --list + +List available remote versions of Python, including Anaconda, Jython, pypy, and stackless + + $ pyenv install --list + + diff --git a/README.md b/README.md index 21341913..e80658cc 100644 --- a/README.md +++ b/README.md @@ -47,14 +47,6 @@ This project was forked from [rbenv](https://github.com/sstephenson/rbenv) and * [Neckbeard Configuration](#neckbeard-configuration) * [Uninstalling Python Versions](#uninstalling-python-versions) * [Command Reference](#command-reference) - * [pyenv local](#pyenv-local) - * [pyenv global](#pyenv-global) - * [pyenv shell](#pyenv-shell) - * [pyenv versions](#pyenv-versions) - * [pyenv version](#pyenv-version) - * [pyenv rehash](#pyenv-rehash) - * [pyenv which](#pyenv-which) - * [pyenv whence](#pyenv-whence) * [Development](#development) * [Version History](#version-history) * [License](#license) @@ -295,238 +287,7 @@ with the `pyenv prefix` command, e.g. `pyenv prefix 2.6.8`. ## Command Reference -Like `git`, the `pyenv` command delegates to subcommands based on its -first argument. The most common subcommands are: - - -### pyenv local - -Sets a local application-specific Python version by writing the version -name to a `.python-version` file in the current directory. This version -overrides the global version, and can be overridden itself by setting -the `PYENV_VERSION` environment variable or with the `pyenv shell` -command. - - $ pyenv local 2.7.6 - -When run without a version number, `pyenv local` reports the currently -configured local version. You can also unset the local version: - - $ pyenv local --unset - -Previous versions of pyenv stored local version specifications in a -file named `.pyenv-version`. For backwards compatibility, pyenv will -read a local version specified in an `.pyenv-version` file, but a -`.python-version` file in the same directory will take precedence. - - -#### pyenv local (advanced) - -You can specify multiple versions as local Python at once. - -Let's say if you have two versions of 2.7.6 and 3.3.3. If you prefer 2.7.6 over 3.3.3, - - $ pyenv local 2.7.6 3.3.3 - $ pyenv versions - system - * 2.7.6 (set by /Users/yyuu/path/to/project/.python-version) - * 3.3.3 (set by /Users/yyuu/path/to/project/.python-version) - $ python --version - Python 2.7.6 - $ python2.7 --version - Python 2.7.6 - $ python3.3 --version - Python 3.3.3 - -or, if you prefer 3.3.3 over 2.7.6, - - $ pyenv local 3.3.3 2.7.6 - $ pyenv versions - system - * 2.7.6 (set by /Users/yyuu/path/to/project/.python-version) - * 3.3.3 (set by /Users/yyuu/path/to/project/.python-version) - venv27 - $ python --version - Python 3.3.3 - $ python2.7 --version - Python 2.7.6 - $ python3.3 --version - Python 3.3.3 - - -### pyenv global - -Sets the global version of Python to be used in all shells by writing -the version name to the `~/.pyenv/version` file. This version can be -overridden by an application-specific `.python-version` file, or by -setting the `PYENV_VERSION` environment variable. - - $ pyenv global 2.7.6 - -The special version name `system` tells pyenv to use the system Python -(detected by searching your `$PATH`). - -When run without a version number, `pyenv global` reports the -currently configured global version. - - -#### pyenv global (advanced) - -You can specify multiple versions as global Python at once. - -Let's say if you have two versions of 2.7.6 and 3.3.3. If you prefer 2.7.6 over 3.3.3, - - $ pyenv global 2.7.6 3.3.3 - $ pyenv versions - system - * 2.7.6 (set by /Users/yyuu/.pyenv/version) - * 3.3.3 (set by /Users/yyuu/.pyenv/version) - $ python --version - Python 2.7.6 - $ python2.7 --version - Python 2.7.6 - $ python3.3 --version - Python 3.3.3 - -or, if you prefer 3.3.3 over 2.7.6, - - $ pyenv global 3.3.3 2.7.6 - $ pyenv versions - system - * 2.7.6 (set by /Users/yyuu/.pyenv/version) - * 3.3.3 (set by /Users/yyuu/.pyenv/version) - venv27 - $ python --version - Python 3.3.3 - $ python2.7 --version - Python 2.7.6 - $ python3.3 --version - Python 3.3.3 - - -### pyenv shell - -Sets a shell-specific Python version by setting the `PYENV_VERSION` -environment variable in your shell. This version overrides -application-specific versions and the global version. - - $ pyenv shell pypy-2.2.1 - -When run without a version number, `pyenv shell` reports the current -value of `PYENV_VERSION`. You can also unset the shell version: - - $ pyenv shell --unset - -Note that you'll need pyenv's shell integration enabled (step 3 of -the installation instructions) in order to use this command. If you -prefer not to use shell integration, you may simply set the -`PYENV_VERSION` variable yourself: - - $ export PYENV_VERSION=pypy-2.2.1 - - -#### pyenv shell (advanced) - -You can specify multiple versions via `PYENV_VERSION` at once. - -Let's say if you have two versions of 2.7.6 and 3.3.3. If you prefer 2.7.6 over 3.3.3, - - $ pyenv shell 2.7.6 3.3.3 - $ pyenv versions - system - * 2.7.6 (set by PYENV_VERSION environment variable) - * 3.3.3 (set by PYENV_VERSION environment variable) - $ python --version - Python 2.7.6 - $ python2.7 --version - Python 2.7.6 - $ python3.3 --version - Python 3.3.3 - -or, if you prefer 3.3.3 over 2.7.6, - - $ pyenv shell 3.3.3 2.7.6 - $ pyenv versions - system - * 2.7.6 (set by PYENV_VERSION environment variable) - * 3.3.3 (set by PYENV_VERSION environment variable) - venv27 - $ python --version - Python 3.3.3 - $ python2.7 --version - Python 2.7.6 - $ python3.3 --version - Python 3.3.3 - - -### pyenv versions - -Lists all Python versions known to pyenv, and shows an asterisk next to -the currently active version. - - $ pyenv versions - 2.5.6 - 2.6.8 - * 2.7.6 (set by /home/yyuu/.pyenv/version) - 3.3.3 - jython-2.5.3 - pypy-2.2.1 - - -### pyenv version - -Displays the currently active Python version, along with information on -how it was set. - - $ pyenv version - 2.7.6 (set by /home/yyuu/.pyenv/version) - - -### pyenv rehash - -Installs shims for all Python binaries known to pyenv (i.e., -`~/.pyenv/versions/*/bin/*`). Run this command after you install a new -version of Python, or install a package that provides binaries. - - $ pyenv rehash - - -### pyenv which - -Displays the full path to the executable that pyenv will invoke when -you run the given command. - - $ pyenv which python3.3 - /home/yyuu/.pyenv/versions/3.3.3/bin/python3.3 - - -### pyenv whence - -Lists all Python versions with the given command installed. - - $ pyenv whence 2to3 - 2.6.8 - 2.7.6 - 3.3.3 - - -### pyenv install - -Part of [Python-build](https://github.com/yyuu/pyenv/tree/master/plugins/python-build), this installs versions of python - - $ pyenv install 2.7.6 - $ pyenv install 2.6.8 - $ pyenv versions - system - 2.6.8 - * 2.7.6 (set by /home/yyuu/.pyenv/version) - - -### pyenv install --list - -List available remote versions of Python, including Anaconda, Jython, pypy, and stackless - - $ pyenv install --list +See [COMMANDS.md](COMMANDS.md). ## Development From 650c9a3d6ee43c4f0be96ee3187e419bd2472fb2 Mon Sep 17 00:00:00 2001 From: Zearin Date: Thu, 20 Mar 2014 09:17:53 -0400 Subject: [PATCH 2/6] README.md: Minor formatting --- README.md | 62 +++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index e80658cc..94ba02d0 100644 --- a/README.md +++ b/README.md @@ -35,19 +35,19 @@ This project was forked from [rbenv](https://github.com/sstephenson/rbenv) and ## Table of Contents -* [How It Works](#how-it-works) +* **[How It Works](#how-it-works)** * [Understanding PATH](#understanding-path) * [Understanding Shims](#understanding-shims) * [Choosing the Python Version](#choosing-the-python-version) * [Locating the Python Installation](#locating-the-python-installation) -* [Installation](#installation) +* **[Installation](#installation)** * [Basic GitHub Checkout](#basic-github-checkout) * [Upgrading](#upgrading) * [Homebrew on Mac OS X](#homebrew-on-mac-os-x) * [Neckbeard Configuration](#neckbeard-configuration) * [Uninstalling Python Versions](#uninstalling-python-versions) -* [Command Reference](#command-reference) -* [Development](#development) +* **[Command Reference](#command-reference)** +* **[Development](#development)** * [Version History](#version-history) * [License](#license) @@ -142,8 +142,7 @@ As far as pyenv is concerned, version names are simply the directories in ## Installation -If you're on Mac OS X, consider -[installing with Homebrew](#homebrew-on-mac-os-x). +If you're on Mac OS X, consider [installing with Homebrew](#homebrew-on-mac-os-x). ### The automatic installer @@ -157,16 +156,16 @@ https://github.com/yyuu/pyenv-installer This will get you going with the latest version of pyenv and make it easy to fork and contribute any changes back upstream. -1. **Check out pyenv where you want it installed.** A good place to choose is -`$HOME/.pyenv` but you may install it somewhere else. +1. **Check out pyenv where you want it installed.** + A good place to choose is `$HOME/.pyenv` (but you can install it somewhere else). $ cd $ git clone git://github.com/yyuu/pyenv.git .pyenv 2. **Define environment variable `PYENV_ROOT`** to point to the path where -pyenv repo is cloned and add `$PYENV_ROOT/bin` to your `$PATH` for access -to the `pyenv` command-line utility. + pyenv repo is cloned and add `$PYENV_ROOT/bin` to your `$PATH` for access + to the `pyenv` command-line utility. $ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile $ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile @@ -181,24 +180,26 @@ to the `pyenv` command-line utility. **Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`. **Ubuntu note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`. -4. **Restart your shell so the path changes take effect.** You can now - begin using pyenv. +4. **Restart your shell so the path changes take effect.** + You can now begin using pyenv. $ exec $SHELL -5. **Install Python versions into `$PYENV_ROOT/versions`.** For example, to - install Python 2.7.6, download and unpack the source, then run: +5. **Install Python versions into `$PYENV_ROOT/versions`.** + For example, to install Python 2.7.6, download and unpack the source, then run: $ pyenv install 2.7.6 - **NOTE** If you need to pass configure option to build, please use + **NOTE:** If you need to pass configure option to build, please use ```CONFIGURE_OPTS``` environment variable. - **NOTE** If you are having trouble installing a python version please visit the wiki page about [Common Build Problems](https://github.com/yyuu/pyenv/wiki/Common-build-problems) + **NOTE:** If you are having trouble installing a python version, + please visit the wiki page about + [Common Build Problems](https://github.com/yyuu/pyenv/wiki/Common-build-problems) -6. **Rebuild the shim binaries.** You should do this any time you install - a new Python binary. (Examples: installing a new Python version, - or installing a package that provides a binary.) +6. **Rebuild the shim binaries.** + You should do this any time you install a new Python binary. + (Examples: installing a new Python version, or installing a package that provides a binary.) $ pyenv rehash @@ -213,8 +214,7 @@ To upgrade to the latest development version of pyenv, use `git pull`: $ cd ~/.pyenv $ git pull -To upgrade to a specific release of pyenv, check out the corresponding -tag: +To upgrade to a specific release of pyenv, check out the corresponding tag: $ cd ~/.pyenv $ git fetch @@ -225,13 +225,12 @@ tag: ### Homebrew on Mac OS X -You can also install pyenv using the -[Homebrew](http://brew.sh) package manager on Mac OS X. +You can also install pyenv using the [Homebrew](http://brew.sh) +package manager for Mac OS X. + + $ brew update + $ brew install pyenv -~~~ -$ brew update -$ brew install pyenv -~~~ To upgrade pyenv in the future, just use `upgrade` instead of `install`. @@ -292,12 +291,11 @@ See [COMMANDS.md](COMMANDS.md). ## Development -The pyenv source code is [hosted on -GitHub](https://github.com/yyuu/pyenv). It's clean, modular, -and easy to understand, even if you're not a shell hacker. +The pyenv source code is [hosted on GitHub](https://github.com/yyuu/pyenv). +It's clean, modular, and easy to understand--even if you're not a shell hacker. -Please feel free to submit pull requests and file bugs on the [issue -tracker](https://github.com/yyuu/pyenv/issues). +Please feel free to submit Pull Requests and report bugs on the +[issue tracker](https://github.com/yyuu/pyenv/issues). ### Version History From 5c6a812b869032314197cb1b4c2c09ff2b756fde Mon Sep 17 00:00:00 2001 From: Zearin Date: Thu, 20 Mar 2014 09:19:11 -0400 Subject: [PATCH 3/6] README.md: Add dividers between major sections --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 94ba02d0..f000e415 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,9 @@ This project was forked from [rbenv](https://github.com/sstephenson/rbenv) and to automate the process. +---- + + ## Table of Contents * **[How It Works](#how-it-works)** @@ -52,6 +55,9 @@ This project was forked from [rbenv](https://github.com/sstephenson/rbenv) and * [License](#license) +---- + + ## How It Works At a high level, pyenv intercepts Python commands using shim @@ -140,6 +146,9 @@ As far as pyenv is concerned, version names are simply the directories in `~/.pyenv/versions`. +---- + + ## Installation If you're on Mac OS X, consider [installing with Homebrew](#homebrew-on-mac-os-x). @@ -284,11 +293,17 @@ to remove. You can find the directory of a particular Python version with the `pyenv prefix` command, e.g. `pyenv prefix 2.6.8`. +---- + + ## Command Reference See [COMMANDS.md](COMMANDS.md). +---- + + ## Development The pyenv source code is [hosted on GitHub](https://github.com/yyuu/pyenv). From 4afa2800663e4d402ca4b18f74534da0acab6454 Mon Sep 17 00:00:00 2001 From: Zearin Date: Thu, 20 Mar 2014 09:20:20 -0400 Subject: [PATCH 4/6] COMMANDS.md: Minor formatting --- COMMANDS.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/COMMANDS.md b/COMMANDS.md index 685cfc33..3f951095 100644 --- a/COMMANDS.md +++ b/COMMANDS.md @@ -5,18 +5,18 @@ first argument. The most common subcommands are: -* [pyenv local](#pyenv-local) -* [pyenv global](#pyenv-global) -* [pyenv shell](#pyenv-shell) -* [pyenv versions](#pyenv-versions) -* [pyenv version](#pyenv-version) -* [pyenv rehash](#pyenv-rehash) -* [pyenv which](#pyenv-which) -* [pyenv whence](#pyenv-whence) - +* [`pyenv local`](#pyenv-local) +* [`pyenv global`](#pyenv-global) +* [`pyenv shell`](#pyenv-shell) +* [`pyenv versions`](#pyenv-versions) +* [`pyenv version`](#pyenv-version) +* [`pyenv rehash`](#pyenv-rehash) +* [`pyenv which`](#pyenv-which) +* [`pyenv whence`](#pyenv-whence) -## pyenv local + +## `pyenv local` Sets a local application-specific Python version by writing the version name to a `.python-version` file in the current directory. This version @@ -37,7 +37,7 @@ read a local version specified in an `.pyenv-version` file, but a `.python-version` file in the same directory will take precedence. -### pyenv local (advanced) +### `pyenv local` (advanced) You can specify multiple versions as local Python at once. @@ -71,7 +71,7 @@ or, if you prefer 3.3.3 over 2.7.6, Python 3.3.3 -## pyenv global +## `pyenv global` Sets the global version of Python to be used in all shells by writing the version name to the `~/.pyenv/version` file. This version can be @@ -87,7 +87,7 @@ When run without a version number, `pyenv global` reports the currently configured global version. -### pyenv global (advanced) +### `pyenv global` (advanced) You can specify multiple versions as global Python at once. @@ -121,7 +121,7 @@ or, if you prefer 3.3.3 over 2.7.6, Python 3.3.3 -## pyenv shell +## `pyenv shell` Sets a shell-specific Python version by setting the `PYENV_VERSION` environment variable in your shell. This version overrides @@ -142,7 +142,7 @@ prefer not to use shell integration, you may simply set the $ export PYENV_VERSION=pypy-2.2.1 -### pyenv shell (advanced) +### `pyenv shell` (advanced) You can specify multiple versions via `PYENV_VERSION` at once. @@ -176,7 +176,7 @@ or, if you prefer 3.3.3 over 2.7.6, Python 3.3.3 -## pyenv versions +## `pyenv versions` Lists all Python versions known to pyenv, and shows an asterisk next to the currently active version. @@ -190,7 +190,7 @@ the currently active version. pypy-2.2.1 -## pyenv version +## `pyenv version` Displays the currently active Python version, along with information on how it was set. @@ -199,7 +199,7 @@ how it was set. 2.7.6 (set by /home/yyuu/.pyenv/version) -## pyenv rehash +## `pyenv rehash` Installs shims for all Python binaries known to pyenv (i.e., `~/.pyenv/versions/*/bin/*`). Run this command after you install a new @@ -208,7 +208,7 @@ version of Python, or install a package that provides binaries. $ pyenv rehash -## pyenv which +## `pyenv which` Displays the full path to the executable that pyenv will invoke when you run the given command. @@ -217,7 +217,7 @@ you run the given command. /home/yyuu/.pyenv/versions/3.3.3/bin/python3.3 -## pyenv whence +## `pyenv whence` Lists all Python versions with the given command installed. @@ -227,7 +227,7 @@ Lists all Python versions with the given command installed. 3.3.3 -## pyenv install +## `pyenv install` Part of [Python-build](https://github.com/yyuu/pyenv/tree/master/plugins/python-build), this installs versions of python @@ -239,7 +239,7 @@ Part of [Python-build](https://github.com/yyuu/pyenv/tree/master/plugins/python- * 2.7.6 (set by /home/yyuu/.pyenv/version) -## pyenv install --list +## `pyenv install --list` List available remote versions of Python, including Anaconda, Jython, pypy, and stackless From abab44df8020fcc11b73dcd92301bda6c4c6a81c Mon Sep 17 00:00:00 2001 From: Zearin Date: Thu, 20 Mar 2014 09:24:31 -0400 Subject: [PATCH 5/6] COMMANDS.md: Add commands from `pyenv --help` --- COMMANDS.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/COMMANDS.md b/COMMANDS.md index 3f951095..f74855ab 100644 --- a/COMMANDS.md +++ b/COMMANDS.md @@ -5,9 +5,12 @@ first argument. The most common subcommands are: +* [`pyenv commands`](#pyenv-commands) * [`pyenv local`](#pyenv-local) * [`pyenv global`](#pyenv-global) * [`pyenv shell`](#pyenv-shell) +* [`pyenv install`](#pyenv-install) +* [`pyenv uninstall`](#pyenv-uninstall) * [`pyenv versions`](#pyenv-versions) * [`pyenv version`](#pyenv-version) * [`pyenv rehash`](#pyenv-rehash) @@ -15,6 +18,10 @@ The most common subcommands are: * [`pyenv whence`](#pyenv-whence) +## `pyenv commands` + +Lists all available pyenv commands. + ## `pyenv local` @@ -176,6 +183,16 @@ or, if you prefer 3.3.3 over 2.7.6, Python 3.3.3 +## `pyenv install` + +Install a Python version (using `python-build`). + + +## `pyenv uninstall` + +Uninstall a specific Python version + + ## `pyenv versions` Lists all Python versions known to pyenv, and shows an asterisk next to From addec6339f9aa5900007e66416bd5c3d2a082faf Mon Sep 17 00:00:00 2001 From: Zearin Date: Thu, 20 Mar 2014 09:33:32 -0400 Subject: [PATCH 6/6] COMMANDS.md: Match order of commands from `pyenv --help` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also added `help` output for `pyenv {,un}install`, since those sections didn’t exist before. They should probably be revised at some point. In the meantime, I think something is better than nothing (in this case). --- COMMANDS.md | 63 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/COMMANDS.md b/COMMANDS.md index f74855ab..595aa881 100644 --- a/COMMANDS.md +++ b/COMMANDS.md @@ -11,9 +11,9 @@ The most common subcommands are: * [`pyenv shell`](#pyenv-shell) * [`pyenv install`](#pyenv-install) * [`pyenv uninstall`](#pyenv-uninstall) -* [`pyenv versions`](#pyenv-versions) -* [`pyenv version`](#pyenv-version) * [`pyenv rehash`](#pyenv-rehash) +* [`pyenv version`](#pyenv-version) +* [`pyenv versions`](#pyenv-versions) * [`pyenv which`](#pyenv-which) * [`pyenv whence`](#pyenv-whence) @@ -187,10 +187,49 @@ or, if you prefer 3.3.3 over 2.7.6, Install a Python version (using `python-build`). + Usage: pyenv install [-f] [-kvp] + pyenv install [-f] [-kvp] + pyenv install -l|--list + + -l/--list List all available versions + -f/--force Install even if the version appears to be installed already + + python-build options: + + -k/--keep Keep source tree in $PYENV_BUILD_ROOT after installation + (defaults to $PYENV_ROOT/sources) + -v/--verbose Verbose mode: print compilation status to stdout + -p/--patch Apply a patch from stdin before building + -g/--debug Build a debug version + ## `pyenv uninstall` -Uninstall a specific Python version +Uninstall a specific Python version. + + Usage: pyenv uninstall [-f|--force] + + -f Attempt to remove the specified version without prompting + for confirmation. If the version does not exist, do not + display an error message. + + +## `pyenv rehash` + +Installs shims for all Python binaries known to pyenv (i.e., +`~/.pyenv/versions/*/bin/*`). Run this command after you install a new +version of Python, or install a package that provides binaries. + + $ pyenv rehash + + +## `pyenv version` + +Displays the currently active Python version, along with information on +how it was set. + + $ pyenv version + 2.7.6 (set by /home/yyuu/.pyenv/version) ## `pyenv versions` @@ -207,24 +246,6 @@ the currently active version. pypy-2.2.1 -## `pyenv version` - -Displays the currently active Python version, along with information on -how it was set. - - $ pyenv version - 2.7.6 (set by /home/yyuu/.pyenv/version) - - -## `pyenv rehash` - -Installs shims for all Python binaries known to pyenv (i.e., -`~/.pyenv/versions/*/bin/*`). Run this command after you install a new -version of Python, or install a package that provides binaries. - - $ pyenv rehash - - ## `pyenv which` Displays the full path to the executable that pyenv will invoke when