Commits

Doug Hellmann  committed e7d360f

Clean up help functions. Add documentation for new -r option to mkvirtualenv.

  • Participants
  • Parent commits f678378

Comments (0)

Files changed (3)

File docs/en/command_ref.rst

 
 Syntax::
 
-    mkvirtualenv [options] ENVNAME
+    mkvirtualenv [-r requirements_file] [virtualenv options] ENVNAME
 
-All command line options are passed directly to ``virtualenv``.  The
-new environment is automatically activated after being initialized.
+All command line options except ``-r`` and ``-h`` are passed directly
+to ``virtualenv``.  The new environment is automatically activated
+after being initialized.
 
 ::
 
     mynewenv
     (mynewenv)$ 
 
+The ``-r`` option can be used to specify a text file listing packages
+to be installed. The argument value is passed to ``pip -r`` to be
+installed.
+
 .. seealso::
 
    * :ref:`scripts-premkvirtualenv`
    * :ref:`scripts-postmkvirtualenv`
+   * `requirements file format`_
+
+.. _requirements file format: http://www.pip-installer.org/en/latest/requirement-format.html
 
 .. _command-lsvirtualenv:
 

File docs/en/history.rst

     ``virtualenvwrapper.project`` plugin into the main project, adding
     :ref:`command-mkproject`, :ref:`command-cdproject`, and
     :ref:`command-setvirtualenvproject` commands.
+  - Add ``-r`` option to :ref:`command-mkvirtualenv` to install
+    dependencies using a pip requirements file.
 
 2.8
 

File virtualenvwrapper.sh

     echo
     echo "    Provide a pip requirements file to install a base set of packages"
     echo "    into the new environment."
+    echo;
+    echo 'virtualenv help:';
+    echo;
+    virtualenv -h;
 }
 
 # Create a new environment, in the WORKON_HOME.
         # echo "arg $i : $a"
         case "$a" in
             -h)
-                echo 'mkvirtualenv help:';
-                echo;
                 mkvirtualenv_help;
-                echo;
-                echo 'virtualenv help:';
-                echo;
-                virtualenv -h;
                 return;;
             -r)
                 i=$(( $i + 1 ));
     echo ""
     echo "Multiple templates may be selected.  They are applied in the order"
     echo "specified on the command line."
+    echo;
+    echo "mkvirtualenv help:"
     echo
-    echo "Available templates:"
+    mkvirtualenv -h;
+    echo
+    echo "Available project templates:"
     echo
     "$VIRTUALENVWRAPPER_PYTHON" -m virtualenvwrapper.hook_loader -l project.template
 }
         # echo "arg $i : $a"
         case "$a" in
             -h)
-                echo 'mkproject help:';
-                echo;
                 mkproject_help;
-                echo;
-                echo 'mkvirtualenv help:';
-                echo;
-                mkvirtualenv -h;
                 return;;
             -t)
                 i=$(( $i + 1 ));