4 Commits

Author SHA1 Message Date
Yamashita Yuu
9651cfe63d release 20130218 2013-02-18 12:42:21 +09:00
Yamashita Yuu
317fcdbfe7 add rbenv 0.4.x style documentation 2013-01-31 12:23:17 +09:00
Yamashita Yuu
fce66ebba7 s/an/a/g 2012-11-06 13:21:21 +09:00
Yamashita Yuu
2551913d75 fix broken markup in README 2012-11-02 22:03:01 +09:00
3 changed files with 20 additions and 13 deletions

View File

@@ -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

View File

@@ -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"
} }

View File

@@ -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