File tree Expand file tree Collapse file tree 3 files changed +22
-16
lines changed
Expand file tree Collapse file tree 3 files changed +22
-16
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,11 @@ Create a new environment, in the WORKON_HOME.
2222
2323Syntax::
2424
25- mkvirtualenv [options] ENVNAME
25+ mkvirtualenv [-r requirements_file] [virtualenv options] ENVNAME
2626
27- All command line options are passed directly to ``virtualenv ``. The
28- new environment is automatically activated after being initialized.
27+ All command line options except ``-r `` and ``-h `` are passed directly
28+ to ``virtualenv ``. The new environment is automatically activated
29+ after being initialized.
2930
3031::
3132
@@ -40,10 +41,17 @@ new environment is automatically activated after being initialized.
4041 mynewenv
4142 (mynewenv)$
4243
44+ The ``-r `` option can be used to specify a text file listing packages
45+ to be installed. The argument value is passed to ``pip -r `` to be
46+ installed.
47+
4348.. seealso ::
4449
4550 * :ref: `scripts-premkvirtualenv `
4651 * :ref: `scripts-postmkvirtualenv `
52+ * `requirements file format `_
53+
54+ .. _requirements file format : http://www.pip-installer.org/en/latest/requirement-format.html
4755
4856.. _command-lsvirtualenv :
4957
Original file line number Diff line number Diff line change 1010 ``virtualenvwrapper.project `` plugin into the main project, adding
1111 :ref: `command-mkproject `, :ref: `command-cdproject `, and
1212 :ref: `command-setvirtualenvproject ` commands.
13+ - Add ``-r `` option to :ref: `command-mkvirtualenv ` to install
14+ dependencies using a pip requirements file.
1315
14162.8
1517
Original file line number Diff line number Diff line change @@ -277,6 +277,10 @@ function mkvirtualenv_help {
277277 echo
278278 echo " Provide a pip requirements file to install a base set of packages"
279279 echo " into the new environment."
280+ echo ;
281+ echo ' virtualenv help:' ;
282+ echo ;
283+ virtualenv -h;
280284}
281285
282286# Create a new environment, in the WORKON_HOME.
@@ -309,13 +313,7 @@ function mkvirtualenv {
309313 # echo "arg $i : $a"
310314 case " $a " in
311315 -h)
312- echo ' mkvirtualenv help:' ;
313- echo ;
314316 mkvirtualenv_help;
315- echo ;
316- echo ' virtualenv help:' ;
317- echo ;
318- virtualenv -h;
319317 return ;;
320318 -r)
321319 i=$(( $i + 1 )) ;
@@ -761,8 +759,12 @@ function mkproject_help {
761759 echo " "
762760 echo " Multiple templates may be selected. They are applied in the order"
763761 echo " specified on the command line."
762+ echo ;
763+ echo " mkvirtualenv help:"
764764 echo
765- echo " Available templates:"
765+ mkvirtualenv -h;
766+ echo
767+ echo " Available project templates:"
766768 echo
767769 " $VIRTUALENVWRAPPER_PYTHON " -m virtualenvwrapper.hook_loader -l project.template
768770}
@@ -793,13 +795,7 @@ function mkproject {
793795 # echo "arg $i : $a"
794796 case " $a " in
795797 -h)
796- echo ' mkproject help:' ;
797- echo ;
798798 mkproject_help;
799- echo ;
800- echo ' mkvirtualenv help:' ;
801- echo ;
802- mkvirtualenv -h;
803799 return ;;
804800 -t)
805801 i=$(( $i + 1 )) ;
You can’t perform that action at this time.
0 commit comments