mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-10 12:33:54 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9651cfe63d | ||
|
|
317fcdbfe7 | ||
|
|
fce66ebba7 | ||
|
|
2551913d75 |
14
README.md
14
README.md
@@ -1,15 +1,15 @@
|
|||||||
# python-virtualenv
|
# python-virtualenv
|
||||||
|
|
||||||
python-virtualenv is an [pyenv](https://github.com/yyuu/pyenv) plugin
|
python-virtualenv is a [pyenv](https://github.com/yyuu/pyenv) plugin
|
||||||
that provides an `pyenv virtualenv` command to create virtualenv for Python
|
that provides an `pyenv virtualenv` command to create virtualenv for Python
|
||||||
on UNIX-like systems.
|
on UNIX-like systems.
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### Installing as an pyenv plugin (recommended)
|
### Installing as a pyenv plugin (recommended)
|
||||||
|
|
||||||
Installing python-virtualenv as an pyenv plugin will give you access to the
|
Installing python-virtualenv as a pyenv plugin will give you access to the
|
||||||
`pyenv virtualenv` command.
|
`pyenv virtualenv` command.
|
||||||
|
|
||||||
$ mkdir -p ~/.pyenv/plugins
|
$ mkdir -p ~/.pyenv/plugins
|
||||||
@@ -56,6 +56,10 @@ under `~/.pyenv/versions`.
|
|||||||
|
|
||||||
## Version History
|
## Version History
|
||||||
|
|
||||||
|
#### 20130218
|
||||||
|
|
||||||
|
* Add pyenv 0.2.x (rbenv 0.4.x) style help messages.
|
||||||
|
|
||||||
#### 20121023
|
#### 20121023
|
||||||
|
|
||||||
* Create virtualenv with exact name of python executables.
|
* Create virtualenv with exact name of python executables.
|
||||||
@@ -71,8 +75,8 @@ under `~/.pyenv/versions`.
|
|||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
|
|
||||||
Copyright (c) 2012 Yamashita, Yuu
|
* Copyright (c) 2012 Yamashita, Yuu
|
||||||
Copyright (c) 2011 Sam Stephenson
|
* Copyright (c) 2011 Sam Stephenson
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Summary: Create a Python virtualenv using the python-virtualenv plugin
|
||||||
|
#
|
||||||
|
# Usage: pyenv virtualenv [-v|--verbose] [VIRTUALENV_OPTIONS] <version> <virtualenv-name>
|
||||||
|
#
|
||||||
|
# -v/--verbose Verbose mode: print compilation status to stdout
|
||||||
|
#
|
||||||
set -e
|
set -e
|
||||||
[ -n "$PYENV_DEBUG" ] && set -x
|
[ -n "$PYENV_DEBUG" ] && set -x
|
||||||
|
|
||||||
# Provide pyenv completions
|
# Provide pyenv completions
|
||||||
if [ "$1" = "--complete" ]; then
|
if [ "$1" = "--complete" ]; then
|
||||||
exec pyenv versions --bare
|
exec pyenv-versions --bare
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$PYENV_ROOT" ]; then
|
if [ -z "$PYENV_ROOT" ]; then
|
||||||
@@ -15,12 +22,8 @@ fi
|
|||||||
eval "$(python-virtualenv --lib)"
|
eval "$(python-virtualenv --lib)"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
{ echo "usage: pyenv virtualenv [-v|--verbose] [VIRTUALENV_OPTIONS] VERSION VIRTUALENV_NAME"
|
# We can remove the sed fallback once pyenv 0.2.0 is widely available.
|
||||||
echo
|
pyenv-help virtualenv 2>/dev/null || sed -ne '/^#/!q;s/.//;s/.//;1,4d;p' < "$0"
|
||||||
echo " -v/--verbose Verbose mode: print compilation status to stdout"
|
|
||||||
echo
|
|
||||||
} >&2
|
|
||||||
|
|
||||||
[ -z "$1" ] || exit "$1"
|
[ -z "$1" ] || exit "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
PYTHON_VIRTUALENV_VERSION="20121023"
|
PYTHON_VIRTUALENV_VERSION="20130218"
|
||||||
|
|
||||||
set -E
|
set -E
|
||||||
exec 3<&2 # preserve original stderr at fd 3
|
exec 3<&2 # preserve original stderr at fd 3
|
||||||
|
|||||||
Reference in New Issue
Block a user