@@ -394,3 +394,99 @@ output.
394394 Enabled global site-packages
395395 (env1)$ toggleglobalsitepackages -q
396396 (env1)$
397+
398+ ============================
399+ Project Directory Management
400+ ============================
401+
402+ .. seealso ::
403+
404+ :ref: `project-management `
405+
406+ .. _command-mkproject :
407+
408+ mkproject
409+ ---------
410+
411+ Create a new virtualenv in the WORKON_HOME and project directory in
412+ PROJECT_HOME.
413+
414+ Syntax::
415+
416+ mkproject [-t template] [virtualenv_options] ENVNAME
417+
418+ The template option may be repeated to have several templates used to
419+ create a new project. The templates are applied in the order named on
420+ the command line. All other options are passed to ``mkvirtualenv `` to
421+ create a virtual environment with the same name as the project.
422+
423+ ::
424+
425+ $ mkproject myproj
426+ New python executable in myproj/bin/python
427+ Installing distribute.............................................
428+ ..................................................................
429+ ..................................................................
430+ done.
431+ Creating /Users/dhellmann/Devel/myproj
432+ (myproj)$ pwd
433+ /Users/dhellmann/Devel/myproj
434+ (myproj)$ echo $VIRTUAL_ENV
435+ /Users/dhellmann/Envs/myproj
436+ (myproj)$
437+
438+ .. seealso ::
439+
440+ * :ref: `scripts-premkproject `
441+ * :ref: `scripts-postmkproject `
442+
443+ setvirtualenvproject
444+ --------------------
445+
446+ Bind an existing virtualenv to an existing project.
447+
448+ Syntax::
449+
450+ setvirtualenvproject [virtualenv_path project_path]
451+
452+ The arguments to ``setvirtualenvproject `` are the full paths to the
453+ virtualenv and project directory. An association is made so that when
454+ ``workon `` activates the virtualenv the project is also activated.
455+
456+ ::
457+
458+ $ mkproject myproj
459+ New python executable in myproj/bin/python
460+ Installing distribute.............................................
461+ ..................................................................
462+ ..................................................................
463+ done.
464+ Creating /Users/dhellmann/Devel/myproj
465+ (myproj)$ mkvirtualenv myproj_new_libs
466+ New python executable in myproj/bin/python
467+ Installing distribute.............................................
468+ ..................................................................
469+ ..................................................................
470+ done.
471+ Creating /Users/dhellmann/Devel/myproj
472+ (myproj_new_libs)$ setvirtualenvproject $VIRTUAL_ENV $(pwd)
473+
474+ When no arguments are given, the current virtualenv and current
475+ directory are assumed.
476+
477+ Any number of virtualenvs can refer to the same project directory,
478+ making it easy to switch between versions of Python or other
479+ dependencies for testing.
480+
481+ .. _command-cdproject :
482+
483+ cdproject
484+ ---------
485+
486+ Change the current working directory to the one specified as the
487+ project directory for the active virtualenv.
488+
489+ Syntax::
490+
491+ cdproject
492+
0 commit comments