| |
| |
| <!-- |
| Documentation generated by Skydoc |
| --> |
| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width initial-scale=1" /> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| |
| <title>Import .whl files into Bazel.</title> |
| |
| <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700" type="text/css"> |
| <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> |
| <link rel="stylesheet" href="https://code.getmdl.io/1.1.1/material.green-light_blue.min.css"> |
| <script defer src="https://code.getmdl.io/1.1.1/material.min.js"></script> |
| <link rel="stylesheet" href="./main.css"> |
| </head> |
| <body> |
| <div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer |
| mdl-layout--fixed-header"> |
| <header class="mdl-layout__header"> |
| <div class="mdl-layout__header-row"> |
| <span class="mdl-layout-title">Import .whl files into Bazel.</span> |
| </div> |
| </header> |
| <div class="mdl-layout__drawer"> |
| <span class="mdl-layout-title">Bazel</span> |
| <nav class="drawer-nav"> |
| <ul class="drawer-nav"> |
| |
| <li><a href="./index.html">Overview</a></li> |
| <li> |
| <a href="./python/pip.html">Import pip requirements into Bazel.</a> |
| <ul> |
| </ul> |
| </li> |
| <li><a href="./index.html">Overview</a></li> |
| <li> |
| <a href="./python/python.html">python Rules</a> |
| <ul> |
| </ul> |
| </li> |
| <li><a href="./index.html">Overview</a></li> |
| <li> |
| <a href="./python/whl.html">Import .whl files into Bazel.</a> |
| <ul> |
| </ul> |
| </li> |
| |
| </ul> |
| </nav> |
| </div> |
| |
| <main class="mdl-layout__content"> |
| <div class="page-content"> |
| <h1>Import .whl files into Bazel.</h1> |
| |
| <nav class="toc"> |
| <h2>Repository Rules</h2> |
| <ul> |
| <li><a href="#whl_library">whl_library</a></li> |
| </ul> |
| </nav> |
| <hr> |
| |
| <h2 id="whl_library">whl_library</h2> |
| |
| <pre>whl_library(<a href="#whl_library.name">name</a>, <a href="#whl_library.requirements">requirements</a>, <a href="#whl_library.whl">whl</a>)</pre> |
| |
| <p>A rule for importing <code>.whl</code> dependencies into Bazel.</p> |
| <p><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.</p> |
| <p>This rule imports a <code>.whl</code> file as a <code>py_library</code>:</p> |
| <pre><code>whl_library( |
| name = "foo", |
| whl = ":my-whl-file", |
| requirements = "name of pip_import rule", |
| ) |
| </code></pre><p>This rule defines a <code>@foo//:pkg</code> <code>py_library</code> target.</p> |
| |
| |
| <h3 id="whl_library_args">Attributes</h3> |
| |
| <table class="params-table"> |
| <colgroup> |
| <col class="col-param" /> |
| <col class="col-description" /> |
| </colgroup> |
| <tbody> |
| <tr id="whl_library.name"> |
| <td><code>name</code></td> |
| <td> |
| <p><code><a href="https://bazel.build/docs/build-ref.html#name">Name</a>; Required</code></p> |
| <p>A unique name for this rule.</p> |
| </td> |
| </tr> |
| <tr id="whl_library.requirements"> |
| <td><code>requirements</code></td> |
| <td> |
| <p><code>String; Optional; Default is ''</code></p> |
| <p>The name of the pip_import repository rule from which to |
| load this .whl's dependencies.</p> |
| </td> |
| </tr> |
| <tr id="whl_library.whl"> |
| <td><code>whl</code></td> |
| <td> |
| <p><code><a href="https://bazel.build/docs/build-ref.html#labels">Label</a>; Required</code></p> |
| <p>The path to the .whl file (the name is expected to follow <a href="https://www.python.org/dev/peps/pep-0427/#file-name-convention">this |
| convention</a>)</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| |
| |
| </div> |
| |
| <footer class="mdl-mini-footer"> |
| <div class="mdl-mini-footer__left-section"> |
| <div class="mdl-logo">Bazel</div> |
| <ul class="mdl-mini-footer__link-list"> |
| <li><a href="http://bazel.io">Home</a></li> |
| <li><a href="https://github.com/bazelbuild">GitHub</a></li> |
| </ul> |
| </div> |
| </footer> |
| </main> |
| </div> |
| </body> |
| </html> |