Import .whl files into Bazel.
Bazel

Import .whl files into Bazel.


download_or_build_wheel

download_or_build_wheel(name, buildtime_deps, pip_args, python, requirement, urls, wheel_name)

Attributes

name

Name; Required

A unique name for this rule.

buildtime_deps

List of labels; Optional; Default is []

pip_args

List of strings; Optional; Default is []

python

Label; Optional

requirement

String; Optional; Default is ''

urls

List of strings; Optional; Default is []

wheel_name

String; Optional; Default is ''


extract_wheels

extract_wheels(name, additional_runtime_deps, extras, python, remove_runtime_deps, repository, wheels)

A rule for importing <code>.whl</code> dependencies into Bazel.

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

This rule imports a <code>.whl</code> file as a <code>py_library</code>:

<pre><code>whl_library( name = "foo", whl = ":my-whl-file", repository = "name of pip_import rule", ) </code></pre>

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

Attributes

name

Name; Required

A unique name for this rule.

additional_runtime_deps

List of strings; Optional; Default is []

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.

python

Label; Optional

remove_runtime_deps

List of strings; Optional; Default is []

repository

String; Optional; Default is ''

wheels

List of labels; Optional; Default is []