mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-08 11:33:49 -05:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57f946550a | ||
|
|
ccaab86c4c | ||
|
|
db4cc6097f | ||
|
|
54e7796eee | ||
|
|
bf613e3d54 | ||
|
|
25c6817c48 | ||
|
|
0464221edb | ||
|
|
4d96271113 | ||
|
|
322aa82ae7 | ||
|
|
9833be730a | ||
|
|
e3c8a754a4 | ||
|
|
2d5fc1b749 | ||
|
|
001c824744 | ||
|
|
fa80772142 | ||
|
|
0c7d2205ff | ||
|
|
4f719b7909 | ||
|
|
134d38fc53 | ||
|
|
3531ad06b2 | ||
|
|
767bcae71c | ||
|
|
0256ff06e8 |
@@ -1,5 +1,13 @@
|
||||
## Version History
|
||||
|
||||
## 1.0.7
|
||||
|
||||
* python-build: Add CPython 3.5.3 (#811)
|
||||
* python-build: Add CPython 3.4.6 (#812)
|
||||
* python-build: Fix tar.gz checksum of CPython 3.6.0 (#793)
|
||||
* python-build: Jython installer workaround (#800)
|
||||
* python-build: Disable optimization (`-O0`) when `--debug` was specified (#808)
|
||||
|
||||
## 1.0.6
|
||||
|
||||
* python-build: Add CPython 3.6.0 (#787)
|
||||
|
||||
2
Makefile
2
Makefile
@@ -9,4 +9,4 @@ test: bats
|
||||
cd plugins/python-build && $(PWD)/bats/bin/bats $${CI:+--tap} test
|
||||
|
||||
bats:
|
||||
git clone https://github.com/sstephenson/bats.git
|
||||
git clone --depth 1 https://github.com/sstephenson/bats.git
|
||||
|
||||
58
README.md
58
README.md
@@ -134,7 +134,8 @@ in this example), but also have Python 3.3.6, 3.2, and 2.5 available on your
|
||||
global system 3.3.6 3.2 2.5`. At this point, one should be able to find the full
|
||||
executable path to each of these using `pyenv which`, e.g. `pyenv which python2.5`
|
||||
(should display `$PYENV_ROOT/versions/2.5/bin/python2.5`), or `pyenv which
|
||||
python3.4` (should display path to system Python3).
|
||||
python3.4` (should display path to system Python3). You can also specify multiple
|
||||
versions in a `.python-version` file, separated by newlines or any whitespace.
|
||||
|
||||
### Locating the Python Installation
|
||||
|
||||
@@ -154,6 +155,12 @@ For example, you might have these versions installed:
|
||||
As far as pyenv is concerned, version names are simply the directories in
|
||||
`~/.pyenv/versions`.
|
||||
|
||||
### 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.
|
||||
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.
|
||||
|
||||
|
||||
----
|
||||
|
||||
@@ -184,18 +191,19 @@ easy to fork and contribute any changes back upstream.
|
||||
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
|
||||
|
||||
```sh
|
||||
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
|
||||
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
|
||||
```
|
||||
**Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`.
|
||||
**Ubuntu and Fedora note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`.
|
||||
|
||||
3. **Add `pyenv init` to your shell** to enable shims and autocompletion.
|
||||
Please make sure `eval "$(pyenv init -)"` is placed toward the end of the shell
|
||||
configuration file since it manipulates `PATH` during the initialization.
|
||||
|
||||
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
|
||||
|
||||
```sh
|
||||
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
|
||||
```
|
||||
**Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`.
|
||||
**Ubuntu and Fedora note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`.
|
||||
|
||||
@@ -207,14 +215,14 @@ easy to fork and contribute any changes back upstream.
|
||||
|
||||
4. **Restart your shell so the path changes take effect.**
|
||||
You can now begin using pyenv.
|
||||
|
||||
$ exec $SHELL
|
||||
|
||||
```sh
|
||||
$ exec $SHELL
|
||||
```
|
||||
5. **Install Python versions into `$PYENV_ROOT/versions`.**
|
||||
For example, to download and install Python 2.7.8, run:
|
||||
|
||||
$ pyenv install 2.7.8
|
||||
|
||||
```sh
|
||||
$ pyenv install 2.7.8
|
||||
```
|
||||
**NOTE:** If you need to pass configure option to build, please use
|
||||
```CONFIGURE_OPTS``` environment variable.
|
||||
|
||||
@@ -233,16 +241,20 @@ upgrade your installation at any time using git.
|
||||
|
||||
To upgrade to the latest development version of pyenv, use `git pull`:
|
||||
|
||||
$ cd ~/.pyenv
|
||||
$ git pull
|
||||
```sh
|
||||
$ cd ~/.pyenv
|
||||
$ git pull
|
||||
```
|
||||
|
||||
To upgrade to a specific release of pyenv, check out the corresponding tag:
|
||||
|
||||
$ cd ~/.pyenv
|
||||
$ git fetch
|
||||
$ git tag
|
||||
v0.1.0
|
||||
$ git checkout v0.1.0
|
||||
```sh
|
||||
$ cd ~/.pyenv
|
||||
$ git fetch
|
||||
$ git tag
|
||||
v0.1.0
|
||||
$ git checkout v0.1.0
|
||||
```
|
||||
|
||||
### Uninstalling pyenv
|
||||
|
||||
@@ -260,9 +272,9 @@ uninstall from the system.
|
||||
2. To completely **uninstall** pyenv, perform step (1) and then remove
|
||||
its root directory. This will **delete all Python versions** that were
|
||||
installed under `` `pyenv root`/versions/ `` directory:
|
||||
|
||||
rm -rf `pyenv root`
|
||||
|
||||
```sh
|
||||
rm -rf `pyenv root`
|
||||
```
|
||||
If you've installed pyenv using a package manager, as a final step
|
||||
perform the pyenv package removal. For instance, for Homebrew:
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
version="1.0.6"
|
||||
version="1.0.7"
|
||||
git_revision=""
|
||||
|
||||
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then
|
||||
|
||||
@@ -588,7 +588,7 @@ fetch_jar() {
|
||||
|
||||
# Must use full path to jar and destination directory:
|
||||
# http://bugs.jython.org/issue2350
|
||||
{ if $JAVA -jar $PWD/${package_name}.jar -s -d $PWD/${package_name}; then
|
||||
{ if $JAVA -jar "$PWD/${package_name}.jar" -s -d "$PWD/${package_name}"; then
|
||||
if [ -z "$KEEP_BUILD_PATH" ]; then
|
||||
rm -f "$package_filename"
|
||||
else
|
||||
@@ -902,11 +902,10 @@ fix_jython_shebangs() {
|
||||
for file in "${PREFIX_PATH}/bin"/*; do
|
||||
case "$(head -1 "${file}")" in
|
||||
"#!"*"/bin/jython" )
|
||||
sed -i.bak "1 s:.*:#\!\/usr\/bin\/env ${PREFIX_PATH}\/bin\/jython:" "${file}"
|
||||
sed -i.bak "1 s:.*:#\!${PREFIX_PATH}\/bin\/jython:" "${file}"
|
||||
;;
|
||||
"#!"*"/bin/python2.7"* )
|
||||
# Jython 2.7+ requires CPython 2.7 to run
|
||||
sed -i.bak "1 s:.*:#\!\/usr\/bin\/env python2.7:" "${file}"
|
||||
sed -i.bak "1 s:.*:#\!\/usr\/bin\/env python:" "${file}"
|
||||
;;
|
||||
esac
|
||||
rm -f "${file}.bak"
|
||||
@@ -1276,6 +1275,17 @@ require_java() {
|
||||
export JAVA="$java"
|
||||
}
|
||||
|
||||
# Let Jython installer to generate shell script instead of python script even if there's `python2.7` available in `$PATH` (#800)
|
||||
# FIXME: better function naming
|
||||
unrequire_python27() {
|
||||
export PATH="${BUILD_PATH}/bin:${PATH}"
|
||||
mkdir -p "${BUILD_PATH}/bin"
|
||||
if command -v python2.7 1>/dev/null 2>&1; then
|
||||
echo false > "${BUILD_PATH}/bin/python2.7"
|
||||
chmod +x "${BUILD_PATH}/bin/python2.7"
|
||||
fi
|
||||
}
|
||||
|
||||
require_distro() {
|
||||
for arg; do
|
||||
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "$arg"* ]]; then
|
||||
@@ -1773,6 +1783,8 @@ for option in "${OPTIONS[@]}"; do
|
||||
;;
|
||||
"g" | "debug" )
|
||||
DEBUG=true
|
||||
# Disable optimization (#808)
|
||||
PYTHON_CFLAGS="-O0 ${PYTHON_CFLAGS}"
|
||||
;;
|
||||
"4" | "ipv4")
|
||||
IPV4=true
|
||||
|
||||
8
plugins/python-build/share/python-build/3.4.6
Normal file
8
plugins/python-build/share/python-build/3.4.6
Normal file
@@ -0,0 +1,8 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2g" "https://www.openssl.org/source/openssl-1.0.2g.tar.gz#b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-6.3" "https://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.4.6" "https://www.python.org/ftp/python/3.4.6/Python-3.4.6.tar.xz#f13428bbe6aa9e3b9b6499502dc488c26096349ed7a21f7a0c1db90911115f40" ldflags_dirs standard verify_py34 ensurepip
|
||||
else
|
||||
install_package "Python-3.4.6" "https://www.python.org/ftp/python/3.4.6/Python-3.4.6.tgz#fe59daced99549d1d452727c050ae486169e9716a890cffb0d468b376d916b48" ldflags_dirs standard verify_py34 ensurepip
|
||||
fi
|
||||
8
plugins/python-build/share/python-build/3.4.6rc1
Normal file
8
plugins/python-build/share/python-build/3.4.6rc1
Normal file
@@ -0,0 +1,8 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2g" "https://www.openssl.org/source/openssl-1.0.2g.tar.gz#b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-6.3" "https://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.4.6rc1" "https://www.python.org/ftp/python/3.4.6/Python-3.4.6rc1.tar.xz#240722b8325a2322793e809d8d194cc0f5eb90a886b1f5bf47f8b3c0936f4a8f" ldflags_dirs standard verify_py34 ensurepip
|
||||
else
|
||||
install_package "Python-3.4.6rc1" "https://www.python.org/ftp/python/3.4.6/Python-3.4.6rc1.tgz#fb8ece0a237c78863fac2841587b754dc6fd4dbbfe6f7fdce2534dce88bd5c5b" ldflags_dirs standard verify_py34 ensurepip
|
||||
fi
|
||||
8
plugins/python-build/share/python-build/3.5.3
Normal file
8
plugins/python-build/share/python-build/3.5.3
Normal file
@@ -0,0 +1,8 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2g" "https://www.openssl.org/source/openssl-1.0.2g.tar.gz#b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-6.3" "https://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.5.3" "https://www.python.org/ftp/python/3.5.3/Python-3.5.3.tar.xz#eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0" ldflags_dirs standard verify_py35 ensurepip
|
||||
else
|
||||
install_package "Python-3.5.3" "https://www.python.org/ftp/python/3.5.3/Python-3.5.3.tgz#d8890b84d773cd7059e597dbefa510340de8336ec9b9e9032bf030f19291565a" ldflags_dirs standard verify_py35 ensurepip
|
||||
fi
|
||||
8
plugins/python-build/share/python-build/3.5.3rc1
Normal file
8
plugins/python-build/share/python-build/3.5.3rc1
Normal file
@@ -0,0 +1,8 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2g" "https://www.openssl.org/source/openssl-1.0.2g.tar.gz#b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-6.3" "https://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.5.3rc1" "https://www.python.org/ftp/python/3.5.3/Python-3.5.3rc1.tar.xz#7140482a99df2684333fa4c56d2381d1295a16c5672adfb42e963fe72aebc1ff" ldflags_dirs standard verify_py35 ensurepip
|
||||
else
|
||||
install_package "Python-3.5.3rc1" "https://www.python.org/ftp/python/3.5.3/Python-3.5.3rc1.tgz#6d685edf75b272b342eb9af683227ea536f7a5fdf60bfdb2ce673e102658e3cf" ldflags_dirs standard verify_py35 ensurepip
|
||||
fi
|
||||
@@ -4,5 +4,5 @@ install_package "readline-6.3" "https://ftpmirror.gnu.org/readline/readline-6.3.
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.6.0" "https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz#b0c5f904f685e32d9232f7bdcbece9819a892929063b6e385414ad2dd6a23622" ldflags_dirs standard verify_py36 ensurepip
|
||||
else
|
||||
install_package "Python-3.6.0" "https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz#b0c5f904f685e32d9232f7bdcbece9819a892929063b6e385414ad2dd6a23622" ldflags_dirs standard verify_py36 ensurepip
|
||||
install_package "Python-3.6.0" "https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz#aa472515800d25a3739833f76ca3735d9f4b2fe77c3cb21f69275e0cce30cb2b" ldflags_dirs standard verify_py36 ensurepip
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
require_java
|
||||
unrequire_python27
|
||||
install_jar "jython-2.7.0" "https://repo1.maven.org/maven2/org/python/jython-installer/2.7.0/jython-installer-2.7.0.jar#b44352ece72382268a60e2848741c96609a91d796bb9a9c6ebeff62f0c12c9cf" jython
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
require_java
|
||||
unrequire_python27
|
||||
install_jar "jython-2.7.1b1" "https://repo1.maven.org/maven2/org/python/jython-installer/2.7.1b1/jython-installer-2.7.1b1.jar#c7a05911fed666c8f9df5bdce50bb5dc75482b7f6b1f1dbe433162d94c960ec3" jython
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
require_java
|
||||
unrequire_python27
|
||||
install_jar "jython-2.7.1b2" "https://repo1.maven.org/maven2/org/python/jython-installer/2.7.1b2/jython-installer-2.7.1b2.jar#d994500808c8d448baab1f98e043e6a11360cff302f401901e73f0e34c27251a" jython
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
require_java
|
||||
unrequire_python27
|
||||
install_jar "jython-2.7.1b3" "https://repo1.maven.org/maven2/org/python/jython-installer/2.7.1b3/jython-installer-2.7.1b3.jar#5c6c7dc372a131dbc2b29b95407c69a4ebab22c1823d9098b7f993444f3090c5" jython
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
require_java
|
||||
unrequire_python27
|
||||
install_hg "jython-dev" "https://hg.python.org/jython" "default" jython_builder ez_setup
|
||||
# pip (>= 1.3) does not work properly since it uses HTTPS for downloads
|
||||
# * https://github.com/yyuu/pyenv/issues/15
|
||||
|
||||
Reference in New Issue
Block a user