{ "info": { "author": "Peter Sagerson", "author_email": "psagers.pypi@ignorare.net", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "License :: Public Domain", "Programming Language :: Unix Shell" ], "description": "=============\nvirtualenv-sh\n=============\n\nThis project is my personal substitute for the venerable `virtualenvwrapper\n`_ (a set of shell functions to\nfacilitate the use of `virtualenv `_).\nLike many, I've used virtualenvwrapper for years, but it's gotten a bit heavy\nover time. I eventually found myself waiting too long for new shells to start\nup, even though I tended to use only the basic features.\n\nThis project is an attempt to solve that problem. I borrowed the clever bits\nof virtualenvwrapper, discarded everything I considered expensive or just not\ninteresting, and added a feature or two of my own. The number one priority of\nthis project is speed. The code is almost pure shell script, although there\nmay be one or two invocations of standard tools like grep or sed.\n\nBe warned that this implementation may not be for you. I may have gotten rid\nof a feature that you liked, either because it was expensive or because I just\ndidn't care about it. I may have accidentally discarded a fix or workaround\nfor some environment that I haven't encountered. I may have just introduced\nnew bugs (shell is an easy language to get wrong in subtle ways). Proceed at\nyour own risk.\n\n\nInstalling\n==========\n\nvirtualenv-sh can be installed with pip or easy_install. To use it, you need\nto source a single shell script in your shell environment. By default, pip or\neasy_install should install it to /usr/local/bin. If you're using bash or zsh,\nyou should import the shell-specific script; otherwise, you can try the\ngeneric one. Add *one* of the following to your shell's init script (.bashrc,\n.zshrc, etc.)::\n\n . /usr/local/bin/virtualenv-sh.bash\n\n::\n\n . /usr/local/bin/virtualenv-sh.zsh\n\n::\n\n . /usr/local/bin/virtualenv-sh.sh\n\nNothing else is required. There's only one environment variable that you can\nuse for configuration, which is WORKON_HOME. This is a path to your collection\nof virutalenvs; you can leave it blank to accept the default of\n``${HOME}/.virtualenvs``. It is assumed that ``virtualenv`` itself is in your\npath.\n\n::\n\n WORKON_HOME=${HOME}/.virtualenvs\n\n\nzsh\n---\n\nIf you're using zsh, you can instead use the precompiled function archive for\noptimal performance, although this needs to be compiled from source on your\nmachine. You can download the source directly or try::\n\n > pip install --upgrade --no-install virtualenv-sh\n > cd build/virtualenv-sh\n > sudo make install\n\nThis will find zsh in your path, use it to compile virtualenv-sh.zwc, and\ninstall it to /usr/local/bin. You can now autoload these functions and\ninitialize virtualenv-sh. You may want to refer to the section on function\nautoloading in the zsh manual if you're not familiar with this process::\n\n # Configure all virtualenv-sh functions for autoloading\n fpath=(/usr/local/bin/virtualenv-sh $fpath)\n autoload -w /usr/local/bin/virtualenv-sh\n\n # Call the main initialization function\n virtualenv_sh_init\n\n\nUsing\n=====\n\nThe basic commands of virtualenv-sh are essentially the same as\nvirtualenvwrapper. Here's a brief recap:\n\n ``mkvirtualenv ``\n\n Creates a new virtual_env in ``$WORKON_HOME``. All arguments are passed\n directly to ``virtualenv``. The new virtual_env will become active. Unlike\n virtualenvwrapper, this takes no additional arguments.\n\n ``rmvirtualenv ``\n\n Deletes an existing virtual_env. If this virtual_env is currently active,\n it is deactivated first as a courtesy.\n\n ``workon []``\n\n Activates the named virtual_env. If another virtual_env is currently\n active, it will be deactivated first. Without arguments, it will list the\n available virtual_envs. In compatible shells, you can choose a virtual_env\n from a menu.\n\n ``autoworkon``\n\n Automatically sets the virtual_env based on special files. See below.\n\n ``deactivate``\n\n Deactivates the current virtual_env (as when using ``virtualenv``\n directly).\n\n ``lsvirtualenvs``\n\n Prints a list of the virtual_envs you've created.\n\n ``cdvirtualenv [subdir]``\n\n Changes the current directory to the root of the active virtual_env, or a\n subdirectory thereof.\n\n ``lssitepackages``\n\n Lists the contents of the active virtual_env's site-packages directory.\n\n ``cdsitepackages [subdir]``\n\n Changes the currect directory to the site-packages directory of the active\n virtual_env, or a subdirectory thereof.\n\n\nHooks\n=====\n\nvirtualenv-sh supports the same global and local (per-env) hooks as\nvirtualenvwrapper. Global hooks are files in $WORKON_HOME; local hooks are\nfiles in $WORKON_HOME/\\{virtual_env\\}/bin. Hooks are executed by sourcing them\nin the current shell context.\n\n initialize (global)\n\n Called at the end of virtualenv_sh_init.\n\n premkvirtualenv, postmkvirtualv, prermvirtualenv, postmkvirtualenv (global)\n\n Called at the beginning and end of mkvirtualenv and rmvirtualenv.\n\n preactivate, postactivate (global, local); predeactivate, postdeactivate (local, global)\n\n Called in the order indicated around activation and deactivation of a\n virtual_env.\n\nIn addition, virtualenv-sh allows you to dynamically register functions to be\ncalled when executing hooks::\n\n virtualenv_sh_add_hook \n virtualenv_sh_remove_hook \n\ne.g.::\n\n my_virtualenv_cleanup()\n {\n # Do some stuff here\n }\n\n virtualenv_sh_add_hook postdeactivate my_virtualenv_cleanup\n\nRegistered hook functions are always executed after all global and local hook\nscripts.\n\n\nautoworkon\n==========\n\nautoworkon is a new command that is designed to automatically update your\nvirtual_env based on your current directory. Note that there is no standard\nshell mechanism for running a function when the current directory changes--and\nmany shells don't have such a mechanism--so installing this is up to you. If\nyou're using zsh, you would use::\n\n autoload -U add-zsh-hook\n add-zsh-hook chpwd autoworkon\n\nThe autoworkon function will walk up the filesystem from the current directory\nuntil it either reaches the root or finds an item named \".workon\". If this is\na readable file, it will treat the first line as the name of a virtual_env and\nactivate it. There are a few special rules to keep in mind:\n\n * autoworkon always stops at the first .workon it finds. It's perfectly\n reasonable to have .workon files at multiple points in a directory tree to\n use different virtual_envs at different levels.\n\n * An empty or unreadable .workon file is interpreted as \"no virtual_env\".\n This is useful if you want to deactivate the automatic virtual_env in a\n particular subtree.\n\n * If you activate a virtual_env manually, autoworkon will never override it.\n autoworkon will only change your active virtual_env if it is unset or was\n previously set by autoworkon.", "description_content_type": null, "docs_url": "https://pythonhosted.org/virtualenv-sh/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/psagers/virtualenv-sh", "keywords": "virtualenv", "license": "BSD, Public Domain", "maintainer": null, "maintainer_email": null, "name": "virtualenv-sh", "package_url": "https://pypi.org/project/virtualenv-sh/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/virtualenv-sh/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/psagers/virtualenv-sh" }, "release_url": "https://pypi.org/project/virtualenv-sh/0.2.2/", "requires_dist": null, "requires_python": null, "summary": "Convenient shell interface to virtualenv", "version": "0.2.2" }, "last_serial": 1088672, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "fa7ba35d77fa7bcf9a67ea9659bdcb92", "sha256": "3f5bad872660ee5c52f07376090cdf300dd8b602e5eddf54d6027e9f338420a7" }, "downloads": -1, "filename": "virtualenv-sh-0.1.tar.gz", "has_sig": true, "md5_digest": "fa7ba35d77fa7bcf9a67ea9659bdcb92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17215, "upload_time": "2012-02-20T00:05:05", "url": "https://files.pythonhosted.org/packages/a3/b4/aa22cc4ebe391141396a509a64f0ef6bd8deb1efc2f8b912048aecaedead/virtualenv-sh-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "00ff8278ff736798c2c71579999eeea1", "sha256": "c1c45966e485ab05981bd71713c3c0163b13a556e6e32994051e3945f49ba14a" }, "downloads": -1, "filename": "virtualenv-sh-0.2.tar.gz", "has_sig": true, "md5_digest": "00ff8278ff736798c2c71579999eeea1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17576, "upload_time": "2012-03-05T21:46:22", "url": "https://files.pythonhosted.org/packages/04/10/3c8201669752d9383dbc3179ad22fcc92a54166197c58b624f8dfb715933/virtualenv-sh-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "2ccc4583b90ce5196ce576a04eb9f3b9", "sha256": "4b7a3188cb2c2af7327b9ed20c090f40cc74f363e8bc568e6821a4dcb7cc5afc" }, "downloads": -1, "filename": "virtualenv-sh-0.2.1.tar.gz", "has_sig": true, "md5_digest": "2ccc4583b90ce5196ce576a04eb9f3b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17373, "upload_time": "2014-05-11T16:26:38", "url": "https://files.pythonhosted.org/packages/a9/a2/fe01f39dda3659c5165e36e38910d1204ebfc3133860d7f0c41863eafa94/virtualenv-sh-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "f214208958111d5b6e17b93225b1f679", "sha256": "7160aa84b53d82de99405e3e54d791ca2c901cb3ac3bda2aa653288fc32be814" }, "downloads": -1, "filename": "virtualenv-sh-0.2.2.tar.gz", "has_sig": true, "md5_digest": "f214208958111d5b6e17b93225b1f679", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17364, "upload_time": "2014-05-11T16:37:55", "url": "https://files.pythonhosted.org/packages/c8/4a/d6bff0db500cdd336c1381c49415305efe33f31202d5d2b42244ebd6b6ce/virtualenv-sh-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f214208958111d5b6e17b93225b1f679", "sha256": "7160aa84b53d82de99405e3e54d791ca2c901cb3ac3bda2aa653288fc32be814" }, "downloads": -1, "filename": "virtualenv-sh-0.2.2.tar.gz", "has_sig": true, "md5_digest": "f214208958111d5b6e17b93225b1f679", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17364, "upload_time": "2014-05-11T16:37:55", "url": "https://files.pythonhosted.org/packages/c8/4a/d6bff0db500cdd336c1381c49415305efe33f31202d5d2b42244ebd6b6ce/virtualenv-sh-0.2.2.tar.gz" } ] }