Skip to content

Latest commit

 

History

History
80 lines (68 loc) · 2.34 KB

File metadata and controls

80 lines (68 loc) · 2.34 KB

Import .whl files into Bazel.

Repository Rules

## whl_library
whl_library(name, extras, requirements, whl)

A rule for importing .whl dependencies into Bazel.

This rule is currently used to implement pip_import, it is not intended to work standalone, and the interface may change. See pip_import for proper usage.

This rule imports a .whl file as a py_library:

whl_library(
    name = "foo",
    whl = ":my-whl-file",
    requirements = "name of pip_import rule",
)

This rule defines a @foo//:pkg py_library target.

Attributes

name

Name; Required

A unique name for this rule.

extras

List of strings; Optional; Default is []

A subset of the "extras" available from this <code>.whl</code> for which <code>requirements</code> has the dependencies.

requirements

String; Optional; Default is ''

The name of the pip_import repository rule from which to load this .whl's dependencies.

whl

Label; Required

The path to the .whl file (the name is expected to follow this convention)