Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

cedarai/rules_pyvenv

Open more actions menu

Repository files navigation

Bazel rules for creating Python virtual environments.

See example/ for an example.

Installation

Add the following to your WORKSPACE.

(Note: see the releases page for release-specific WORKSPACE config)

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_pyvenv",
    strip_prefix = "rules_pyvenv-main",
    url = "https://github.com/cedarai/rules_pyvenv/archive/main.tar.gz",
)

These rules require a recent version of Python 3.6+ and rules_python. The environment is built using the venv library that ships with the Python standard library. If using the system-provided Python on Debian/Ubuntu, you may need to run

apt install python3.8-venv

On Windows, you need to enable symlink support.

Example

$ cd example
$ bazel run //:venv env
$ . env/bin/activate

About

Bazel rules for creating Python virtual envs.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6

Morty Proxy This is a proxified and sanitized view of the page, visit original site.