{ "info": { "author": "Bert JW Regeer", "author_email": "bertjw@regeer.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: ISC License (ISCL)", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "vrun\n====\n\nAdds Python's bin/Scripts directory to ``PATH`` before executing a command.\nPrimarily used with Python virtual environments.\n\nOverview\n--------\n\nA small Python helper tool that will modify the ``PATH`` in the environment\nbefore executing the executable provided as the first argument. This is useful\nwhen programs expect certain binaries to be available in ``PATH`` so they can\nexecute them using ``os.popen()`` and friends or even for shell scripts that\nare executing Python tools that one would prefer to not globally install.\n\nScripts may detect that vrun has been used by looking for the environment\nvariable ``VRUN_ACTIVATED`` which is set to ``1`` when run. It is not\nrecommended that script writers do this.\n\nUse\n---\n\nOn macOS/FreeBSD/Linux/Unix:\n\n.. code::\n\n $ python3 -mvenv ./env/\n $ ./env/bin/pip install vrun\n $ ./env/bin/vrun /bin/bash -c 'echo $PATH'\n\n\nOn Windows:\n\n.. code::\n\n C:\\> python3.exe -mvenv env\n C:\\> env\\Scripts\\pip.exe install vrun\n C:\\> env\\Scripts\\vrun.exe python -c \"import os; print(os.environ['PATH'])\"\n\n\nIf for example there is a script that executes ``pip`` without explicitly\nproviding a PATH that includes a virtual environment the system installed\n``pip`` may accidentally be invoked instead. With vrun the virtual environment\nwill come first in the search path and thus ``pip`` will be safely executed\nwithin the context of the virtual environment.\n\nSuch as a shell script:\n\n.. code::\n\n $ ./env/bin/vrun ./myscript.sh\n\nOr executing a Windows batch script:\n\n.. code::\n\n C:\\> env\\Scripts\\vrun.exe script.bat\n\n\nCommand aliases\n---------------\n\nvrun allows you to define command aliases in a configuration file, either\n``vrun.cfg``, ``vrun.ini`` or ``setup.cfg``.\n\nThese configuration files must contain at least a ``vrun`` section, then using standard ini format you may specify key/value pairs:\n\n.. code::\n\n [vrun]\n python.version = python --version\n shell = /bin/bash\n echo = /bin/bash -c 'echo ${@}' _ {posargs} echo off the bare walls\n\nNow you may run these commands using:\n\n.. code::\n\n vrun python.version\n\nWhich will return something similar to:\n\n.. code::\n\n Python 3.6.2\n\nThen you can do positional argument interpolation:\n\n.. code::\n\n vrun echo the soft voices\n\nwill output:\n\n.. code::\n\n the soft voices echo off the bare walls\n\nInterpolation\n~~~~~~~~~~~~~\n\nSo long as the keyword ``{posargs}`` is stand-alone, and surrounded by spaces\n(and not inside of a quoted segment) ``vrun`` will replace it with any\npositonal arguments provided on the command line. If not positional arguments\nare provided, it will remove the ``{posargs}`` placeholder and remove it as an\nargument.\n\nIf there is no ``{posargs}`` provided in the command alias, all extra arguments\nprovided after the initial command will be passed as positional arguments.\n\nUsing the ``shell`` example from above, you may do:\n\n.. code::\n\n vrun shell -c 'echo $PATH'\n\nwhich will execute:\n\n.. code::\n\n /bin/bash -c 'echo $PATH'\n\nWithin the virtual environment as expected. This can be useful to allow you to\npredefine certain longer commands, but still allow the user on the fly on the\ncommand line to add additional parameters as necessary.\n\nvrun or vexec\n-------------\n\nvrun installs itself as both ``vrun`` and ``vexec``. The later may be typed\nwith the left hand only and is slightly faster to roll off the keyboard!\n\nLicense\n-------\n\nPlease see the `LICENSE\n`_ file in the source\ncode repository \n\n\n0.4 (2017-09-27)\n================\n\n- You may now create command aliases by creating a new configuration file named\n ``vrun.cfg`` or adding a section to an existing ``setup.cfg`` named ``[vrun]``.\n\n .. code::\n\n [vrun]\n python.version = python --version\n shell = /bin/bash\n echo = /bin/bash -c 'echo ${@}' _ {posargs} echo off the bare walls\n\n Which may then be used like so:\n\n .. code::\n\n vrun python.version\n vrun echo the soft voices\n vrun shell -c 'echo $PATH'\n\n- New tests have been added, and coverage is now 100%. All new features from\n now on will have to meet the same coverage requirements to verify there are\n no breaking changes.\n\n0.3 (2017-06-13)\n================\n\n- Adds Windows support, so now you can use:\n\n .. code::\n\n Script\\vrun.exe python -c \"import os; print(os.environ['PATH'])\"\n\n To run Windows binaries with their ``%PATH%`` modified.\n\n vrun will also automatically add the `.exe` when passing the name of a script\n that exists in the ``Scripts`` folder.\n\n So the following are the same:\n\n .. code::\n\n Script\\vrun.exe python\n\n and:\n\n .. code::\n\n Script\\vrun.exe python.exe\n\n0.2 (2017-06-08)\n================\n\n- Also export the environment variable ``VIRTUAL_ENV`` pointing to the virtual\n environment.\n\n0.1 (2017-06-08)\n================\n\n- Initial release and implementation of the vrun functionality\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bertjwregeer/vrun", "keywords": "virtualenv vexec vrun venv bin Scripts", "license": "ISC", "maintainer": "", "maintainer_email": "", "name": "vrun", "package_url": "https://pypi.org/project/vrun/", "platform": "", "project_url": "https://pypi.org/project/vrun/", "project_urls": { "Homepage": "https://github.com/bertjwregeer/vrun" }, "release_url": "https://pypi.org/project/vrun/0.4/", "requires_dist": [ "Sphinx; extra == 'docs'", "pytest; extra == 'testing'", "pytest-cov; extra == 'testing'" ], "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "summary": "Adds Python's bin/Scripts directory to PATH before executing a command. Primarily used with Python virtual environments.", "version": "0.4" }, "last_serial": 4490597, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "27949100ce328b0b5e0e2399f59b55fc", "sha256": "2c3287befe354ac26bee490cc1b49d9348147a1a2793a74f8c12261e6f2c8730" }, "downloads": -1, "filename": "vrun-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "27949100ce328b0b5e0e2399f59b55fc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 7058, "upload_time": "2017-06-09T03:24:16", "url": "https://files.pythonhosted.org/packages/16/0e/1b407f98b9fc3e66a7551288e31eeaf54d866d5af31c25455a17af2c671b/vrun-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "29de613231e7973f459d67d6027399e4", "sha256": "76173eff62d8512740ed03f4b1d622fe7db54f035110b44dc267c7b06afe63d9" }, "downloads": -1, "filename": "vrun-0.1.tar.gz", "has_sig": false, "md5_digest": "29de613231e7973f459d67d6027399e4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 5603, "upload_time": "2017-06-09T03:24:17", "url": "https://files.pythonhosted.org/packages/d0/38/5452f47349ff1683a4c708dcc2575daa635ccb458e8ed0d100d48fa01561/vrun-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "2753f3cd55a8be250255d7a0c64901ad", "sha256": "d8f48802e9ca2902a0cf1faf55519a62981342b8e944931b9265cc5e265de496" }, "downloads": -1, "filename": "vrun-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2753f3cd55a8be250255d7a0c64901ad", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 7175, "upload_time": "2017-06-09T04:22:49", "url": "https://files.pythonhosted.org/packages/a9/e4/f2ec880b91d0087baa6c1a98654863744f043befdf3724d91d8ac6392c39/vrun-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ad3e6a6411999f5aef57d3e218faa53b", "sha256": "e5507236c33412406a5468a35a80dbd968076ad739b39cbb92bbd2e30cdd7bfa" }, "downloads": -1, "filename": "vrun-0.2.tar.gz", "has_sig": false, "md5_digest": "ad3e6a6411999f5aef57d3e218faa53b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 5705, "upload_time": "2017-06-09T04:22:51", "url": "https://files.pythonhosted.org/packages/40/b4/05571c4a2fc7acf6f14208555aad59fe0354040d414a5c72972ec2c8542a/vrun-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "ce1a824d806ebd22815f4f77cc69f63b", "sha256": "04b3f7ad076f958bae93dc57cd1e4fdc1ececb7643c0161fdb7fe8021f6a31c2" }, "downloads": -1, "filename": "vrun-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ce1a824d806ebd22815f4f77cc69f63b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 8471, "upload_time": "2017-06-13T07:02:01", "url": "https://files.pythonhosted.org/packages/2c/11/551e543ea46f2ef617c7f279cc35bfb3e2e74a58803f09caa4588b359d50/vrun-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d15aa4e1c744ca3b695ea2c573f34f5f", "sha256": "3be4615dc651198aead0b350dfc5477d4b904d719d0264042be3521df9e4e716" }, "downloads": -1, "filename": "vrun-0.3.tar.gz", "has_sig": false, "md5_digest": "d15aa4e1c744ca3b695ea2c573f34f5f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 5855, "upload_time": "2017-06-13T07:02:02", "url": "https://files.pythonhosted.org/packages/74/1a/5ddb01e0c123e34aa01c5b6a0673b18ef1cb4ad9c1f6f23086e61545a536/vrun-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "09d1c42c5b2084d7e9acbe27ee0af302", "sha256": "5e57e06477b8b24906078a566a2bc77e8f656f75d879521bd1f976183cb601a8" }, "downloads": -1, "filename": "vrun-0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "09d1c42c5b2084d7e9acbe27ee0af302", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 10517, "upload_time": "2017-09-17T22:15:22", "url": "https://files.pythonhosted.org/packages/52/07/4c1d9716d77c3235ee307fec7bc51d56ccd8e03ca3dbb404a15049f52d00/vrun-0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7316feeedfcfbb9260a1f290a27f9a24", "sha256": "ab85d1e6f1034b9fe9aac04288895bc1afe7440ac54cf965f161f77d3f8ebdbc" }, "downloads": -1, "filename": "vrun-0.4.tar.gz", "has_sig": false, "md5_digest": "7316feeedfcfbb9260a1f290a27f9a24", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 10982, "upload_time": "2017-09-17T22:15:23", "url": "https://files.pythonhosted.org/packages/5a/ec/40d05f3d8468d80ed1659bb9dca991f9fd144de15f12f2a69f7a709e78cf/vrun-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "09d1c42c5b2084d7e9acbe27ee0af302", "sha256": "5e57e06477b8b24906078a566a2bc77e8f656f75d879521bd1f976183cb601a8" }, "downloads": -1, "filename": "vrun-0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "09d1c42c5b2084d7e9acbe27ee0af302", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 10517, "upload_time": "2017-09-17T22:15:22", "url": "https://files.pythonhosted.org/packages/52/07/4c1d9716d77c3235ee307fec7bc51d56ccd8e03ca3dbb404a15049f52d00/vrun-0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7316feeedfcfbb9260a1f290a27f9a24", "sha256": "ab85d1e6f1034b9fe9aac04288895bc1afe7440ac54cf965f161f77d3f8ebdbc" }, "downloads": -1, "filename": "vrun-0.4.tar.gz", "has_sig": false, "md5_digest": "7316feeedfcfbb9260a1f290a27f9a24", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 10982, "upload_time": "2017-09-17T22:15:23", "url": "https://files.pythonhosted.org/packages/5a/ec/40d05f3d8468d80ed1659bb9dca991f9fd144de15f12f2a69f7a709e78cf/vrun-0.4.tar.gz" } ] }