- Rapid virtualenv deployments with a single
ezenv
command. - Quickly deploy a virualenv for any Python version using isolated
pyenv
based python installs. - Automatically installs
pyenv
andpyenv-virtualenv
for you if you don't have them. - Will automatically fall back to using
git
for satisfying dependencies ifbrew
is unavailable. - Just as simply deploy Django for any Django and Python version using
ezdjango
.
- OS X or Linux (other *nixes should work, but are untested)
- Python
- Bash
- Homebrew (http://brew.sh) or Git (http://git-scm.com)
To install simply set INSTALL_DIR
to where you would like to install. This should probably be somewhere in your PATH
or you can add it to your path using the optional steps shown in the "Add INSTALL_DIR to your PATH" section below.
git clone https://github.com/bzdzb/ezenv.git
cd ezenv
INSTALL_DIR=~/bin
cp ezenv ezdjango $INSTALL_DIR
chmod +x $INSTALL_DIR/ez{env,django}
echo "export PATH=$INSTALL_DIR:\$PATH" >> ~/.bashrc
. ~/.bashrc
$ ezenv example
Installing pyenv... done.
Installing pyenv-virtualenv... done.
Adding pyenv init to ~/.bashrc... done.
Initializing pyenv... done.
Creating pyenv virualenv example. May take a few min... done.
Get started using your new virtualenv with:
source ~/.bashrc && pyenv activate example
$ source ~/.bashrc && pyenv activate example
(example) $ pyenv which python
/Users/bzdzb/.pyenv/versions/example/bin/python
(example) $
$ ezenv example34 3.4.1
Installing pyenv... done.
Installing pyenv-virtualenv... done.
Adding pyenv init to ~/.bashrc... done.
Initializing pyenv... done.
Creating pyenv virualenv example34. May take a few min... done.
Get started using your new virtualenv with:
source ~/.bashrc && pyenv activate example34
$ source ~/.bashrc && pyenv activate example34
(example34) $ python -V
Python 3.4.1
(example34) $
$ ezdjango dj
Installing Django... done.
To activate, run:
source ~/.bashrc && pyenv activate dj
$ source ~/.bashrc && pyenv activate dj
(dj) $ python
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.get_version()
'1.6.5'
$ ezdjango dj1.5 1.5.8
Installing Django... done.
To activate, run:
source ~/.bashrc && pyenv activate dj1.5
$ source ~/.bashrc && pyenv activate dj1.5
(dj1.5) $ python
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.get_version()
'1.5.8'
$ ezdjango djPyPy 1.6.5 pypy-2.3
Installing Django... done.
To activate, run:
source ~/.bashrc && pyenv activate djPyPy
$ source ~/.bashrc && pyenv activate djPyPy
(djPyPy) $ python
Python 2.7.6 (394146e9bb67, May 08 2014, 16:45:59)
[PyPy 2.3.0 with GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>> import django
>>>> django.get_version()
'1.6.5'
ezenv uses pyenv and pyenv-virtualenv under the hood, so you can still use all of the pyenv commands for managing your pyenv and pyenv-virtualenv instances.
$ pyenv versions
system
3.4.1
dj
dj1.5
* djPyPy (set by PYENV_VERSION environment variable)
example
example34
pypy-2.3
# pyenv install --list
Available versions:
2.4
2.4.1
2.4.2
...
...
stackless-3.3.5
stackless-dev
$ pyenv uninstall djPyPy
pyenv: remove /Users/bzdzb/.pyenv/versions/djPyPy? y
$ pyenv uninstall 3.4.1
pyenv: remove /Users/bzdzb/.pyenv/versions/3.4.1? y
Copyright © 2016, Brett Anderson (https://github.com/bzdzb) All rights reserved.