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.
22
22
23
23
Syntax::
24
24
25
- mkvirtualenv [options] ENVNAME
25
+ mkvirtualenv [-r requirements_file] [virtualenv options] ENVNAME
26
26
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.
29
30
30
31
::
31
32
@@ -40,10 +41,17 @@ new environment is automatically activated after being initialized.
40
41
mynewenv
41
42
(mynewenv)$
42
43
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
+
43
48
.. seealso ::
44
49
45
50
* :ref: `scripts-premkvirtualenv `
46
51
* :ref: `scripts-postmkvirtualenv `
52
+ * `requirements file format `_
53
+
54
+ .. _requirements file format : http://www.pip-installer.org/en/latest/requirement-format.html
47
55
48
56
.. _command-lsvirtualenv :
49
57
Original file line number Diff line number Diff line change 10
10
``virtualenvwrapper.project `` plugin into the main project, adding
11
11
:ref: `command-mkproject `, :ref: `command-cdproject `, and
12
12
:ref: `command-setvirtualenvproject ` commands.
13
+ - Add ``-r `` option to :ref: `command-mkvirtualenv ` to install
14
+ dependencies using a pip requirements file.
13
15
14
16
2.8
15
17
Original file line number Diff line number Diff line change @@ -277,6 +277,10 @@ function mkvirtualenv_help {
277
277
echo
278
278
echo " Provide a pip requirements file to install a base set of packages"
279
279
echo " into the new environment."
280
+ echo ;
281
+ echo ' virtualenv help:' ;
282
+ echo ;
283
+ virtualenv -h;
280
284
}
281
285
282
286
# Create a new environment, in the WORKON_HOME.
@@ -309,13 +313,7 @@ function mkvirtualenv {
309
313
# echo "arg $i : $a"
310
314
case " $a " in
311
315
-h)
312
- echo ' mkvirtualenv help:' ;
313
- echo ;
314
316
mkvirtualenv_help;
315
- echo ;
316
- echo ' virtualenv help:' ;
317
- echo ;
318
- virtualenv -h;
319
317
return ;;
320
318
-r)
321
319
i=$(( $i + 1 )) ;
@@ -761,8 +759,12 @@ function mkproject_help {
761
759
echo " "
762
760
echo " Multiple templates may be selected. They are applied in the order"
763
761
echo " specified on the command line."
762
+ echo ;
763
+ echo " mkvirtualenv help:"
764
764
echo
765
- echo " Available templates:"
765
+ mkvirtualenv -h;
766
+ echo
767
+ echo " Available project templates:"
766
768
echo
767
769
" $VIRTUALENVWRAPPER_PYTHON " -m virtualenvwrapper.hook_loader -l project.template
768
770
}
@@ -793,13 +795,7 @@ function mkproject {
793
795
# echo "arg $i : $a"
794
796
case " $a " in
795
797
-h)
796
- echo ' mkproject help:' ;
797
- echo ;
798
798
mkproject_help;
799
- echo ;
800
- echo ' mkvirtualenv help:' ;
801
- echo ;
802
- mkvirtualenv -h;
803
799
return ;;
804
800
-t)
805
801
i=$(( $i + 1 )) ;
You can’t perform that action at this time.
0 commit comments