Browse Source

add install.sh

pull/3/merge
Yamashita Yuu 12 years ago
parent
commit
7121fe04b0
3 changed files with 44 additions and 1 deletions
  1. +18
    -0
      README.md
  2. +3
    -1
      bin/python-virtualenv
  3. +23
    -0
      install.sh

+ 18
- 0
README.md View File

@ -21,6 +21,24 @@ the `~/.pyenv/plugins/python-virtualenv` directory. From that directory, you
can check out a specific release tag. To update python-virtualenv, run `git
pull` to download the latest changes.
### Installing as a standalone program (advanced)
Installing python-virtualenv as a standalone program will give you access to
the `python-virtualenv` command for precise control over Python version
installation. If you have rbenv installed, you will also be able to
use the `rbenv install` command.
$ git clone git://github.com/yyuu/python-virtualenv.git
$ cd python-virtualenv
$ ./install.sh
This will install python-virtualenv into `/usr/local`. If you do not have
write permission to `/usr/local`, you will need to run `sudo
./install.sh` instead. You can install to a different prefix by
setting the `PREFIX` environment variable.
To update python-virtualenv after it has been installed, run `git pull` in
your cloned copy of the repository, then re-run the install script.
## Usage

+ 3
- 1
bin/python-virtualenv View File

@ -115,7 +115,9 @@ fi
VIRTUALENV_PYTHON_BIN="${VIRTUALENV_PATH}/bin/python"
# create virtualenv
"${PYTHON_BIN}" "${PYTHON_VIRTUALENV_ROOT}/libexec/virtualenv.py" "${VIRTUALENV_OPTIONS[@]}" "${VIRTUALENV_PATH}"
VIRTUALENV="${PYTHON_VIRTUALENV_ROOT}/libexec/python-virtualenv/virtualenv.py"
[ -f "${VIRTUALENV}" ] || VIRTUALENV="${PYTHON_VIRTUALENV_ROOT}/libexec/virtualenv.py"
"${PYTHON_BIN}" "${VIRTUALENV}" "${VIRTUALENV_OPTIONS[@]}" "${VIRTUALENV_PATH}"
# create symlink of `python' bound for actual executable
if [ ! -f "$VIRTUALENV_PYTHON_BIN" ]; then

+ 23
- 0
install.sh View File

@ -0,0 +1,23 @@
#!/bin/sh
set -e
if [ -z "${PREFIX}" ]; then
PREFIX="/usr/local"
fi
BIN_PATH="${PREFIX}/bin"
LIBEXEC_PATH="${PREFIX}/libexec/python-virtualenv"
mkdir -p "${BIN_PATH}"
mkdir -p "${LIBEXEC_PATH}"
for file in bin/*; do
cp "${file}" "${BIN_PATH}"
done
for file in libexec/*; do
cp "${file}" "${LIBEXEC_PATH}"
done
echo "Installed python-virtualenv at ${PREFIX}"

Loading…
Cancel
Save