This commit is contained in:
Yamashita, Yuu 2017-03-06 04:14:12 +00:00
parent 4107496053
commit 98a879bdb0
2 changed files with 22 additions and 22 deletions

View File

@ -31,7 +31,7 @@ This project was forked from [rbenv](https://github.com/rbenv/rbenv) and
* **Need to be loaded into your shell.** Instead, pyenv's shim * **Need to be loaded into your shell.** Instead, pyenv's shim
approach works by adding a directory to your `$PATH`. approach works by adding a directory to your `$PATH`.
* **Manage virtualenv.** Of course, you can create [virtualenv](https://pypi.python.org/pypi/virtualenv) * **Manage virtualenv.** Of course, you can create [virtualenv](https://pypi.python.org/pypi/virtualenv)
yourself, or [pyenv-virtualenv](https://github.com/yyuu/pyenv-virtualenv) yourself, or [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv)
to automate the process. to automate the process.
@ -108,19 +108,19 @@ When you execute a shim, pyenv determines which Python version to use by
reading it from the following sources, in this order: reading it from the following sources, in this order:
1. The `PYENV_VERSION` environment variable (if specified). You can use 1. The `PYENV_VERSION` environment variable (if specified). You can use
the [`pyenv shell`](https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-shell) command to set this environment the [`pyenv shell`](https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-shell) command to set this environment
variable in your current shell session. variable in your current shell session.
2. The application-specific `.python-version` file in the current 2. The application-specific `.python-version` file in the current
directory (if present). You can modify the current directory's directory (if present). You can modify the current directory's
`.python-version` file with the [`pyenv local`](https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-local) `.python-version` file with the [`pyenv local`](https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-local)
command. command.
3. The first `.python-version` file found (if any) by searching each parent 3. The first `.python-version` file found (if any) by searching each parent
directory, until reaching the root of your filesystem. directory, until reaching the root of your filesystem.
4. The global `$(pyenv root)/version` file. You can modify this file using 4. The global `$(pyenv root)/version` file. You can modify this file using
the [`pyenv global`](https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-global) command. If the global version the [`pyenv global`](https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-global) command. If the global version
file is not present, pyenv assumes you want to use the "system" file is not present, pyenv assumes you want to use the "system"
Python. (In other words, whatever version would run if pyenv weren't in your Python. (In other words, whatever version would run if pyenv weren't in your
`PATH`.) `PATH`.)
@ -157,7 +157,7 @@ As far as pyenv is concerned, version names are simply the directories in
### Managing Virtual Environments ### Managing Virtual Environments
There is a pyenv plugin named [pyenv-virtualenv](https://github.com/yyuu/pyenv-virtualenv) which comes with various features to help pyenv users to manage virtual environments created by virtualenv or Anaconda. There is a pyenv plugin named [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv) which comes with various features to help pyenv users to manage virtual environments created by virtualenv or Anaconda.
Because the `activate` script of those virtual environments are relying on mutating `$PATH` variable of user's interactive shell, it will intercept pyenv's shim style command execution hooks. Because the `activate` script of those virtual environments are relying on mutating `$PATH` variable of user's interactive shell, it will intercept pyenv's shim style command execution hooks.
We'd recommend to install pyenv-virtualenv as well if you have some plan to play with those virtual environments. We'd recommend to install pyenv-virtualenv as well if you have some plan to play with those virtual environments.
@ -173,7 +173,7 @@ If you're on Mac OS X, consider [installing with Homebrew](#homebrew-on-mac-os-x
### The automatic installer ### The automatic installer
Visit my other project: Visit my other project:
https://github.com/yyuu/pyenv-installer https://github.com/pyenv/pyenv-installer
### Basic GitHub Checkout ### Basic GitHub Checkout
@ -184,7 +184,7 @@ easy to fork and contribute any changes back upstream.
1. **Check out pyenv where you want it installed.** 1. **Check out pyenv where you want it installed.**
A good place to choose is `$HOME/.pyenv` (but you can install it somewhere else). A good place to choose is `$HOME/.pyenv` (but you can install it somewhere else).
$ git clone https://github.com/yyuu/pyenv.git ~/.pyenv $ git clone https://github.com/pyenv/pyenv.git ~/.pyenv
2. **Define environment variable `PYENV_ROOT`** to point to the path where 2. **Define environment variable `PYENV_ROOT`** to point to the path where
@ -211,7 +211,7 @@ easy to fork and contribute any changes back upstream.
to point to `.bashrc`. On such systems you should almost certainly put the abovementioned line to point to `.bashrc`. On such systems you should almost certainly put the abovementioned line
`eval "$(pyenv init -)` into `.bash_profile`, and **not** into `.bashrc`. Otherwise you `eval "$(pyenv init -)` into `.bash_profile`, and **not** into `.bashrc`. Otherwise you
may observe strange behaviour, such as `pyenv` getting into an infinite loop. may observe strange behaviour, such as `pyenv` getting into an infinite loop.
See [#264](https://github.com/yyuu/pyenv/issues/264) for details. See [#264](https://github.com/pyenv/pyenv/issues/264) for details.
4. **Restart your shell so the path changes take effect.** 4. **Restart your shell so the path changes take effect.**
You can now begin using pyenv. You can now begin using pyenv.
@ -231,7 +231,7 @@ easy to fork and contribute any changes back upstream.
**NOTE:** If you are having trouble installing a python version, **NOTE:** If you are having trouble installing a python version,
please visit the wiki page about please visit the wiki page about
[Common Build Problems](https://github.com/yyuu/pyenv/wiki/Common-build-problems) [Common Build Problems](https://github.com/pyenv/pyenv/wiki/Common-build-problems)
#### Upgrading #### Upgrading
@ -370,7 +370,7 @@ name | default | description
## Development ## Development
The pyenv source code is [hosted on The pyenv source code is [hosted on
GitHub](https://github.com/yyuu/pyenv). It's clean, modular, GitHub](https://github.com/pyenv/pyenv). It's clean, modular,
and easy to understand, even if you're not a shell hacker. and easy to understand, even if you're not a shell hacker.
Tests are executed using [Bats](https://github.com/sstephenson/bats): Tests are executed using [Bats](https://github.com/sstephenson/bats):
@ -379,8 +379,8 @@ Tests are executed using [Bats](https://github.com/sstephenson/bats):
$ bats/test/<file>.bats $ bats/test/<file>.bats
Please feel free to submit pull requests and file bugs on the [issue Please feel free to submit pull requests and file bugs on the [issue
tracker](https://github.com/yyuu/pyenv/issues). tracker](https://github.com/pyenv/pyenv/issues).
[pyenv-virtualenv]: https://github.com/yyuu/pyenv-virtualenv#readme [pyenv-virtualenv]: https://github.com/pyenv/pyenv-virtualenv#readme
[hooks]: https://github.com/yyuu/pyenv/wiki/Authoring-plugins#pyenv-hooks [hooks]: https://github.com/pyenv/pyenv/wiki/Authoring-plugins#pyenv-hooks

View File

@ -1,13 +1,13 @@
# python-build # python-build
python-build is a [pyenv](https://github.com/yyuu/pyenv) plugin that python-build is a [pyenv](https://github.com/pyenv/pyenv) plugin that
provides a `pyenv install` command to compile and install different versions provides a `pyenv install` command to compile and install different versions
of Python on UNIX-like systems. of Python on UNIX-like systems.
You can also use python-build without pyenv in environments where you need You can also use python-build without pyenv in environments where you need
precise control over Python version installation. precise control over Python version installation.
See the [list of releases](https://github.com/yyuu/pyenv/releases) See the [list of releases](https://github.com/pyenv/pyenv/releases)
for changes in each version. for changes in each version.
@ -24,7 +24,7 @@ Installing python-build as a standalone program will give you access to the
`python-build` command for precise control over Python version installation. If you `python-build` command for precise control over Python version installation. If you
have pyenv installed, you will also be able to use the `pyenv install` command. have pyenv installed, you will also be able to use the `pyenv install` command.
git clone git://github.com/yyuu/pyenv.git git clone git://github.com/pyenv/pyenv.git
cd pyenv/plugins/python-build cd pyenv/plugins/python-build
./install.sh ./install.sh
@ -55,7 +55,7 @@ Or, if you would like to install the latest development release:
## Usage ## Usage
Before you begin, you should ensure that your build environment has the proper Before you begin, you should ensure that your build environment has the proper
system dependencies for compiling the wanted Python Version (see our [recommendations](https://github.com/yyuu/pyenv/wiki#suggested-build-environment)). system dependencies for compiling the wanted Python Version (see our [recommendations](https://github.com/pyenv/pyenv/wiki#suggested-build-environment)).
### Using `pyenv install` with pyenv ### Using `pyenv install` with pyenv
@ -93,10 +93,10 @@ Both `pyenv install` and `python-build` accept a path to a custom definition fil
in place of a version name. Custom definitions let you develop and install in place of a version name. Custom definitions let you develop and install
versions of Python that are not yet supported by python-build. versions of Python that are not yet supported by python-build.
See the [python-build built-in definitions](https://github.com/yyuu/pyenv/tree/master/plugins/python-build/share/python-build) as a starting point for See the [python-build built-in definitions](https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build) as a starting point for
custom definition files. custom definition files.
[definitions]: https://github.com/yyuu/pyenv/tree/master/plugins/python-build/share/python-build [definitions]: https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build
### Special environment variables ### Special environment variables
@ -213,10 +213,10 @@ variable when using `--keep` with `python-build`.
## Getting Help ## Getting Help
Please see the [pyenv wiki](https://github.com/yyuu/pyenv/wiki) for solutions to common problems. Please see the [pyenv wiki](https://github.com/pyenv/pyenv/wiki) for solutions to common problems.
[wiki]: https://github.com/yyuu/pyenv/wiki [wiki]: https://github.com/pyenv/pyenv/wiki
If you can't find an answer on the wiki, open an issue on the [issue If you can't find an answer on the wiki, open an issue on the [issue
tracker](https://github.com/yyuu/pyenv/issues). Be sure to include tracker](https://github.com/pyenv/pyenv/issues). Be sure to include
the full build log for build failures. the full build log for build failures.