commit | 6a1c8c67d8712ed4ac9c03f2eef6c7f2fe5d0d22 | [log] [tgz] |
---|---|---|
author | Aviv Keshet <akeshet@chromium.org> | Mon Dec 19 15:00:33 2016 -0800 |
committer | chrome-bot <chrome-bot@chromium.org> | Tue Jan 03 15:13:53 2017 -0800 |
tree | e91489ca92ac2c968f1a9d33d9ba3c4a46101976 | |
parent | a8e434ed2fd4857c8ee0b9d22ec59653d585cdfe [diff] |
pip_packages: add GitPython and its dependencies These are used by a new git history examining script in chromite. BUG=chromium:675793 TEST=None Change-Id: I9a35d3c696786e864a59380ad3d4401ac91054ed Reviewed-on: https://chromium-review.googlesource.com/422448 Commit-Ready: Aviv Keshet <akeshet@chromium.org> Tested-by: Aviv Keshet <akeshet@chromium.org> Reviewed-by: Allen Li <ayatane@chromium.org> Reviewed-by: Aviv Keshet <akeshet@chromium.org>
This repository provides a common Python virtualenv interface that infra code (such as chromite) can depend on. At this point, it is experimental and not yet used in production.
Virtualenv users should create a requirements.txt
file listing the packages that they need and use the wrapper scripts (described below) to create the virtualenv and run commands within it.
To add packages to this repository, run:
$ pip wheel -w path/to/pip_packages -r path/to/requirements.txt
Commit the changes and make a CL.
For example for chromite, from within chromite/virtualenv
, run:
$ pip wheel -w pip_packages -r requirements.txt
This repository contains two scripts for working with Python virtualenvs.
venv_command
runs a command in a virtualenv environment. This is more convenient than having to start a shell and source bin/activate
. For example, to start Python inside the virtualenv:
$ venv_command path/to/venv python
create_venv
creates or updates a virtualenv using a requirements.txt
file.
$ create_venv path/to/venv path/to/requirements.txt
Here’s a complete example:
$ echo mock=2.0.0 > requirements.txt $ ./create_venv venv requirements.txt $ ./venv_command venv python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mock >>>