Fix //docs:update (#876)
Fix //docs:update
Also regenerates docs with the new stardoc version.
Right now the command errors out on fresh clones or after a `bazel
clean`.
$ bazel run //docs:update
cp: cannot stat 'bazel-bin/docs/packaging.md_': No such file or directory
cp: cannot stat 'bazel-bin/docs/pip.md_': No such file or directory
cp: cannot stat 'bazel-bin/docs/pip_repository.md_': No such file or directory
cp: cannot stat 'bazel-bin/docs/python.md_': No such file or directory
I submitted bazelbuild/stardoc#139 to fix this. @brandjon pointed out
that this should just work as-is, but doesn't because of
bazelbuild/bazel#15043. Until the bazel bug is addressed, we can make
`//docs:update` work by pulling in the latest stardoc version.
One side effect of this patch is that the generated documentation
itself changed a decent amount.
Now the tool works again without errors even after a fresh clone or a
`bazel clean`
$ bazel run //docs:update
'bazel-bin/docs/packaging.md_' -> 'docs/packaging.md'
'bazel-bin/docs/pip.md_' -> 'docs/pip.md'
'bazel-bin/docs/pip_repository.md_' -> 'docs/pip_repository.md'
'bazel-bin/docs/python.md_' -> 'docs/python.md'diff --git a/docs/packaging.md b/docs/packaging.md
index af822b0..22e6419 100755
--- a/docs/packaging.md
+++ b/docs/packaging.md
@@ -1,6 +1,8 @@
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
-<a name="#py_package"></a>
+Rules for building wheels.
+
+<a id="py_package"></a>
## py_package
@@ -18,13 +20,13 @@
| Name | Description | Type | Mandatory | Default |
-| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
-| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
-| deps | - | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
-| packages | List of Python packages to include in the distribution. Sub-packages are automatically included. | List of strings | optional | [] |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="py_package-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
+| <a id="py_package-deps"></a>deps | - | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | <code>[]</code> |
+| <a id="py_package-packages"></a>packages | List of Python packages to include in the distribution. Sub-packages are automatically included. | List of strings | optional | <code>[]</code> |
-<a name="#py_wheel"></a>
+<a id="py_wheel"></a>
## py_wheel
@@ -83,31 +85,31 @@
| Name | Description | Type | Mandatory | Default |
-| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
-| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
-| abi | Python ABI tag. 'none' for pure-Python wheels. | String | optional | "none" |
-| author | A string specifying the author of the package. | String | optional | "" |
-| author_email | A string specifying the email address of the package author. | String | optional | "" |
-| classifiers | A list of strings describing the categories for the package. For valid classifiers see https://pypi.org/classifiers | List of strings | optional | [] |
-| console_scripts | Deprecated console_script entry points, e.g. <code>{'main': 'examples.wheel.main:main'}</code>.<br><br>Deprecated: prefer the <code>entry_points</code> attribute, which supports <code>console_scripts</code> as well as other entry points. | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
-| deps | Targets to be included in the distribution.<br><br>The targets to package are usually <code>py_library</code> rules or filesets (for packaging data files).<br><br>Note it's usually better to package <code>py_library</code> targets and use <code>entry_points</code> attribute to specify <code>console_scripts</code> than to package <code>py_binary</code> rules. <code>py_binary</code> targets would wrap a executable script that tries to locate <code>.runfiles</code> directory which is not packaged in the wheel. | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
-| description_file | A file containing text describing the package. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
-| distribution | Name of the distribution.<br><br>This should match the project name onm PyPI. It's also the name that is used to refer to the package in other packages' dependencies. | String | required | |
-| entry_points | entry_points, e.g. <code>{'console_scripts': ['main = examples.wheel.main:main']}</code>. | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> List of strings</a> | optional | {} |
-| extra_distinfo_files | Extra files to add to distinfo directory in the archive. | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: Label -> String</a> | optional | {} |
-| extra_requires | List of optional requirements for this package | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> List of strings</a> | optional | {} |
-| homepage | A string specifying the URL for the package homepage. | String | optional | "" |
-| license | A string specifying the license of the package. | String | optional | "" |
-| platform | Supported platform. Use 'any' for pure-Python wheel.<br><br>If you have included platform-specific data, such as a .pyd or .so extension module, you will need to specify the platform in standard pip format. If you support multiple platforms, you can define platform constraints, then use a select() to specify the appropriate specifier, eg:<br><br><code> platform = select({ "//platforms:windows_x86_64": "win_amd64", "//platforms:macos_x86_64": "macosx_10_7_x86_64", "//platforms:linux_x86_64": "manylinux2014_x86_64", }) </code> | String | optional | "any" |
-| python_requires | Python versions required by this distribution, e.g. '>=3.5,<3.7' | String | optional | "" |
-| python_tag | Supported Python version(s), eg <code>py3</code>, <code>cp35.cp36</code>, etc | String | optional | "py3" |
-| requires | List of requirements for this package. See the section on [Declaring required dependency](https://setuptools.readthedocs.io/en/latest/userguide/dependency_management.html#declaring-dependencies) for details and examples of the format of this argument. | List of strings | optional | [] |
-| stamp | Whether to encode build information into the wheel. Possible values:<br><br>- <code>stamp = 1</code>: Always stamp the build information into the wheel, even in [--nostamp](https://docs.bazel.build/versions/main/user-manual.html#flag--stamp) builds. This setting should be avoided, since it potentially kills remote caching for the target and any downstream actions that depend on it.<br><br>- <code>stamp = 0</code>: Always replace build information by constant values. This gives good build result caching.<br><br>- <code>stamp = -1</code>: Embedding of build information is controlled by the [--[no]stamp](https://docs.bazel.build/versions/main/user-manual.html#flag--stamp) flag.<br><br>Stamped targets are not rebuilt unless their dependencies change. | Integer | optional | -1 |
-| strip_path_prefixes | path prefixes to strip from files added to the generated package | List of strings | optional | [] |
-| version | Version number of the package. Note that this attribute supports stamp format strings (eg. <code>1.2.3-{BUILD_TIMESTAMP}</code>) as well as 'make variables' (e.g. <code>1.2.3-$(VERSION)</code>). | String | required | |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="py_wheel-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
+| <a id="py_wheel-abi"></a>abi | Python ABI tag. 'none' for pure-Python wheels. | String | optional | <code>"none"</code> |
+| <a id="py_wheel-author"></a>author | A string specifying the author of the package. | String | optional | <code>""</code> |
+| <a id="py_wheel-author_email"></a>author_email | A string specifying the email address of the package author. | String | optional | <code>""</code> |
+| <a id="py_wheel-classifiers"></a>classifiers | A list of strings describing the categories for the package. For valid classifiers see https://pypi.org/classifiers | List of strings | optional | <code>[]</code> |
+| <a id="py_wheel-console_scripts"></a>console_scripts | Deprecated console_script entry points, e.g. <code>{'main': 'examples.wheel.main:main'}</code>.<br><br>Deprecated: prefer the <code>entry_points</code> attribute, which supports <code>console_scripts</code> as well as other entry points. | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | <code>{}</code> |
+| <a id="py_wheel-deps"></a>deps | Targets to be included in the distribution.<br><br>The targets to package are usually <code>py_library</code> rules or filesets (for packaging data files).<br><br>Note it's usually better to package <code>py_library</code> targets and use <code>entry_points</code> attribute to specify <code>console_scripts</code> than to package <code>py_binary</code> rules. <code>py_binary</code> targets would wrap a executable script that tries to locate <code>.runfiles</code> directory which is not packaged in the wheel. | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | <code>[]</code> |
+| <a id="py_wheel-description_file"></a>description_file | A file containing text describing the package. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
+| <a id="py_wheel-distribution"></a>distribution | Name of the distribution.<br><br>This should match the project name onm PyPI. It's also the name that is used to refer to the package in other packages' dependencies. | String | required | |
+| <a id="py_wheel-entry_points"></a>entry_points | entry_points, e.g. <code>{'console_scripts': ['main = examples.wheel.main:main']}</code>. | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> List of strings</a> | optional | <code>{}</code> |
+| <a id="py_wheel-extra_distinfo_files"></a>extra_distinfo_files | Extra files to add to distinfo directory in the archive. | <a href="https://bazel.build/rules/lib/dict">Dictionary: Label -> String</a> | optional | <code>{}</code> |
+| <a id="py_wheel-extra_requires"></a>extra_requires | List of optional requirements for this package | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> List of strings</a> | optional | <code>{}</code> |
+| <a id="py_wheel-homepage"></a>homepage | A string specifying the URL for the package homepage. | String | optional | <code>""</code> |
+| <a id="py_wheel-license"></a>license | A string specifying the license of the package. | String | optional | <code>""</code> |
+| <a id="py_wheel-platform"></a>platform | Supported platform. Use 'any' for pure-Python wheel.<br><br>If you have included platform-specific data, such as a .pyd or .so extension module, you will need to specify the platform in standard pip format. If you support multiple platforms, you can define platform constraints, then use a select() to specify the appropriate specifier, eg:<br><br><code> platform = select({ "//platforms:windows_x86_64": "win_amd64", "//platforms:macos_x86_64": "macosx_10_7_x86_64", "//platforms:linux_x86_64": "manylinux2014_x86_64", }) </code> | String | optional | <code>"any"</code> |
+| <a id="py_wheel-python_requires"></a>python_requires | Python versions required by this distribution, e.g. '>=3.5,<3.7' | String | optional | <code>""</code> |
+| <a id="py_wheel-python_tag"></a>python_tag | Supported Python version(s), eg <code>py3</code>, <code>cp35.cp36</code>, etc | String | optional | <code>"py3"</code> |
+| <a id="py_wheel-requires"></a>requires | List of requirements for this package. See the section on [Declaring required dependency](https://setuptools.readthedocs.io/en/latest/userguide/dependency_management.html#declaring-dependencies) for details and examples of the format of this argument. | List of strings | optional | <code>[]</code> |
+| <a id="py_wheel-stamp"></a>stamp | Whether to encode build information into the wheel. Possible values:<br><br>- <code>stamp = 1</code>: Always stamp the build information into the wheel, even in [--nostamp](https://docs.bazel.build/versions/main/user-manual.html#flag--stamp) builds. This setting should be avoided, since it potentially kills remote caching for the target and any downstream actions that depend on it.<br><br>- <code>stamp = 0</code>: Always replace build information by constant values. This gives good build result caching.<br><br>- <code>stamp = -1</code>: Embedding of build information is controlled by the [--[no]stamp](https://docs.bazel.build/versions/main/user-manual.html#flag--stamp) flag.<br><br>Stamped targets are not rebuilt unless their dependencies change. | Integer | optional | <code>-1</code> |
+| <a id="py_wheel-strip_path_prefixes"></a>strip_path_prefixes | path prefixes to strip from files added to the generated package | List of strings | optional | <code>[]</code> |
+| <a id="py_wheel-version"></a>version | Version number of the package. Note that this attribute supports stamp format strings (eg. <code>1.2.3-{BUILD_TIMESTAMP}</code>) as well as 'make variables' (e.g. <code>1.2.3-$(VERSION)</code>). | String | required | |
-<a name="#PyWheelInfo"></a>
+<a id="PyWheelInfo"></a>
## PyWheelInfo
@@ -121,8 +123,8 @@
| Name | Description |
-| :-------------: | :-------------: |
-| name_file | File: A file containing the canonical name of the wheel (after stamping, if enabled). |
-| wheel | File: The wheel file itself. |
+| :------------- | :------------- |
+| <a id="PyWheelInfo-name_file"></a>name_file | File: A file containing the canonical name of the wheel (after stamping, if enabled). |
+| <a id="PyWheelInfo-wheel"></a>wheel | File: The wheel file itself. |
diff --git a/docs/pip.md b/docs/pip.md
index 7f70ef5..fc38f0f 100644
--- a/docs/pip.md
+++ b/docs/pip.md
@@ -1,6 +1,8 @@
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
-<a name="#compile_pip_requirements"></a>
+Import pip requirements into Bazel.
+
+<a id="compile_pip_requirements"></a>
## compile_pip_requirements
@@ -17,28 +19,28 @@
It also generates two targets for running pip-compile:
-- validate with `bazel test <name>_test`
-- update with `bazel run <name>.update`
+- validate with `bazel test <name>_test`
+- update with `bazel run <name>.update`
**PARAMETERS**
| Name | Description | Default Value |
-| :-------------: | :-------------: | :-------------: |
-| name | base name for generated targets, typically "requirements" | none |
-| extra_args | passed to pip-compile | <code>[]</code> |
-| visibility | passed to both the _test and .update rules | <code>["//visibility:private"]</code> |
-| requirements_in | file expressing desired dependencies | <code>None</code> |
-| requirements_txt | result of "compiling" the requirements.in file | <code>None</code> |
-| requirements_linux | File of linux specific resolve output to check validate if requirement.in has changes. | <code>None</code> |
-| requirements_darwin | File of darwin specific resolve output to check validate if requirement.in has changes. | <code>None</code> |
-| requirements_windows | File of windows specific resolve output to check validate if requirement.in has changes. | <code>None</code> |
-| tags | tagging attribute common to all build rules, passed to both the _test and .update rules | <code>None</code> |
-| kwargs | other bazel attributes passed to the "_test" rule | none |
+| :------------- | :------------- | :------------- |
+| <a id="compile_pip_requirements-name"></a>name | base name for generated targets, typically "requirements" | none |
+| <a id="compile_pip_requirements-extra_args"></a>extra_args | passed to pip-compile | <code>[]</code> |
+| <a id="compile_pip_requirements-visibility"></a>visibility | passed to both the _test and .update rules | <code>["//visibility:private"]</code> |
+| <a id="compile_pip_requirements-requirements_in"></a>requirements_in | file expressing desired dependencies | <code>None</code> |
+| <a id="compile_pip_requirements-requirements_txt"></a>requirements_txt | result of "compiling" the requirements.in file | <code>None</code> |
+| <a id="compile_pip_requirements-requirements_linux"></a>requirements_linux | File of linux specific resolve output to check validate if requirement.in has changes. | <code>None</code> |
+| <a id="compile_pip_requirements-requirements_darwin"></a>requirements_darwin | File of darwin specific resolve output to check validate if requirement.in has changes. | <code>None</code> |
+| <a id="compile_pip_requirements-requirements_windows"></a>requirements_windows | File of windows specific resolve output to check validate if requirement.in has changes. | <code>None</code> |
+| <a id="compile_pip_requirements-tags"></a>tags | tagging attribute common to all build rules, passed to both the _test and .update rules | <code>None</code> |
+| <a id="compile_pip_requirements-kwargs"></a>kwargs | other bazel attributes passed to the "_test" rule | none |
-<a name="#package_annotation"></a>
+<a id="package_annotation"></a>
## package_annotation
@@ -56,16 +58,20 @@
| Name | Description | Default Value |
-| :-------------: | :-------------: | :-------------: |
-| additive_build_content | Raw text to add to the generated <code>BUILD</code> file of a package. | <code>None</code> |
-| copy_files | A mapping of <code>src</code> and <code>out</code> files for [@bazel_skylib//rules:copy_file.bzl][cf] | <code>{}</code> |
-| copy_executables | A mapping of <code>src</code> and <code>out</code> files for [@bazel_skylib//rules:copy_file.bzl][cf]. Targets generated here will also be flagged as executable. | <code>{}</code> |
-| data | A list of labels to add as <code>data</code> dependencies to the generated <code>py_library</code> target. | <code>[]</code> |
-| data_exclude_glob | A list of exclude glob patterns to add as <code>data</code> to the generated <code>py_library</code> target. | <code>[]</code> |
-| srcs_exclude_glob | A list of labels to add as <code>srcs</code> to the generated <code>py_library</code> target. | <code>[]</code> |
+| :------------- | :------------- | :------------- |
+| <a id="package_annotation-additive_build_content"></a>additive_build_content | Raw text to add to the generated <code>BUILD</code> file of a package. | <code>None</code> |
+| <a id="package_annotation-copy_files"></a>copy_files | A mapping of <code>src</code> and <code>out</code> files for [@bazel_skylib//rules:copy_file.bzl][cf] | <code>{}</code> |
+| <a id="package_annotation-copy_executables"></a>copy_executables | A mapping of <code>src</code> and <code>out</code> files for [@bazel_skylib//rules:copy_file.bzl][cf]. Targets generated here will also be flagged as executable. | <code>{}</code> |
+| <a id="package_annotation-data"></a>data | A list of labels to add as <code>data</code> dependencies to the generated <code>py_library</code> target. | <code>[]</code> |
+| <a id="package_annotation-data_exclude_glob"></a>data_exclude_glob | A list of exclude glob patterns to add as <code>data</code> to the generated <code>py_library</code> target. | <code>[]</code> |
+| <a id="package_annotation-srcs_exclude_glob"></a>srcs_exclude_glob | A list of labels to add as <code>srcs</code> to the generated <code>py_library</code> target. | <code>[]</code> |
+
+**RETURNS**
+
+str: A json encoded string of the provided content.
-<a name="#pip_install"></a>
+<a id="pip_install"></a>
## pip_install
@@ -93,13 +99,13 @@
| Name | Description | Default Value |
-| :-------------: | :-------------: | :-------------: |
-| requirements | A 'requirements.txt' pip requirements file. | <code>None</code> |
-| name | A unique name for the created external repository (default 'pip'). | <code>"pip"</code> |
-| kwargs | Additional arguments to the [<code>pip_repository</code>](./pip_repository.md) repository rule. | none |
+| :------------- | :------------- | :------------- |
+| <a id="pip_install-requirements"></a>requirements | A 'requirements.txt' pip requirements file. | <code>None</code> |
+| <a id="pip_install-name"></a>name | A unique name for the created external repository (default 'pip'). | <code>"pip"</code> |
+| <a id="pip_install-kwargs"></a>kwargs | Additional arguments to the [<code>pip_repository</code>](./pip_repository.md) repository rule. | none |
-<a name="#pip_parse"></a>
+<a id="pip_parse"></a>
## pip_parse
@@ -196,11 +202,11 @@
| Name | Description | Default Value |
-| :-------------: | :-------------: | :-------------: |
-| requirements | Deprecated. See requirements_lock. | <code>None</code> |
-| requirements_lock | A fully resolved 'requirements.txt' pip requirement file containing the transitive set of your dependencies. If this file is passed instead of 'requirements' no resolve will take place and pip_repository will create individual repositories for each of your dependencies so that wheels are fetched/built only for the targets specified by 'build/run/test'. Note that if your lockfile is platform-dependent, you can use the <code>requirements_[platform]</code> attributes. | <code>None</code> |
-| name | The name of the generated repository. The generated repositories containing each requirement will be of the form <name>_<requirement-name>. | <code>"pip_parsed_deps"</code> |
-| bzlmod | Whether this rule is being run under a bzlmod module extension. | <code>False</code> |
-| kwargs | Additional arguments to the [<code>pip_repository</code>](./pip_repository.md) repository rule. | none |
+| :------------- | :------------- | :------------- |
+| <a id="pip_parse-requirements"></a>requirements | Deprecated. See requirements_lock. | <code>None</code> |
+| <a id="pip_parse-requirements_lock"></a>requirements_lock | A fully resolved 'requirements.txt' pip requirement file containing the transitive set of your dependencies. If this file is passed instead of 'requirements' no resolve will take place and pip_repository will create individual repositories for each of your dependencies so that wheels are fetched/built only for the targets specified by 'build/run/test'. Note that if your lockfile is platform-dependent, you can use the <code>requirements_[platform]</code> attributes. | <code>None</code> |
+| <a id="pip_parse-name"></a>name | The name of the generated repository. The generated repositories containing each requirement will be of the form <name>_<requirement-name>. | <code>"pip_parsed_deps"</code> |
+| <a id="pip_parse-bzlmod"></a>bzlmod | Whether this rule is being run under a bzlmod module extension. | <code>False</code> |
+| <a id="pip_parse-kwargs"></a>kwargs | Additional arguments to the [<code>pip_repository</code>](./pip_repository.md) repository rule. | none |
diff --git a/docs/pip_repository.md b/docs/pip_repository.md
index 2081605..ae9100a 100644
--- a/docs/pip_repository.md
+++ b/docs/pip_repository.md
@@ -1,14 +1,16 @@
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
-<a name="#pip_repository"></a>
+
+
+<a id="pip_repository"></a>
## pip_repository
<pre>
pip_repository(<a href="#pip_repository-name">name</a>, <a href="#pip_repository-annotations">annotations</a>, <a href="#pip_repository-bzlmod">bzlmod</a>, <a href="#pip_repository-download_only">download_only</a>, <a href="#pip_repository-enable_implicit_namespace_pkgs">enable_implicit_namespace_pkgs</a>,
<a href="#pip_repository-environment">environment</a>, <a href="#pip_repository-extra_pip_args">extra_pip_args</a>, <a href="#pip_repository-isolated">isolated</a>, <a href="#pip_repository-pip_data_exclude">pip_data_exclude</a>, <a href="#pip_repository-python_interpreter">python_interpreter</a>,
- <a href="#pip_repository-python_interpreter_target">python_interpreter_target</a>, <a href="#pip_repository-quiet">quiet</a>, <a href="#pip_repository-repo_prefix">repo_prefix</a>, <a href="#pip_repository-requirements_darwin">requirements_darwin</a>, <a href="#pip_repository-requirements_linux">requirements_linux</a>,
- <a href="#pip_repository-requirements_lock">requirements_lock</a>, <a href="#pip_repository-requirements_windows">requirements_windows</a>, <a href="#pip_repository-timeout">timeout</a>)
+ <a href="#pip_repository-python_interpreter_target">python_interpreter_target</a>, <a href="#pip_repository-quiet">quiet</a>, <a href="#pip_repository-repo_mapping">repo_mapping</a>, <a href="#pip_repository-repo_prefix">repo_prefix</a>, <a href="#pip_repository-requirements_darwin">requirements_darwin</a>,
+ <a href="#pip_repository-requirements_linux">requirements_linux</a>, <a href="#pip_repository-requirements_lock">requirements_lock</a>, <a href="#pip_repository-requirements_windows">requirements_windows</a>, <a href="#pip_repository-timeout">timeout</a>)
</pre>
A rule for importing `requirements.txt` dependencies into Bazel.
@@ -55,35 +57,36 @@
| Name | Description | Type | Mandatory | Default |
-| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
-| name | A unique name for this repository. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
-| annotations | Optional annotations to apply to packages | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
-| bzlmod | Whether this repository rule is invoked under bzlmod, in which case we do not create the install_deps() macro. | Boolean | optional | False |
-| download_only | Whether to use "pip download" instead of "pip wheel". Disables building wheels from source, but allows use of --platform, --python-version, --implementation, and --abi in --extra_pip_args to download wheels for a different platform from the host platform. | Boolean | optional | False |
-| enable_implicit_namespace_pkgs | If true, disables conversion of native namespace packages into pkg-util style namespace packages. When set all py_binary and py_test targets must specify either <code>legacy_create_init=False</code> or the global Bazel option <code>--incompatible_default_to_explicit_init_py</code> to prevent <code>__init__.py</code> being automatically generated in every directory.<br><br>This option is required to support some packages which cannot handle the conversion to pkg-util style. | Boolean | optional | False |
-| environment | Environment variables to set in the pip subprocess. Can be used to set common variables such as <code>http_proxy</code>, <code>https_proxy</code> and <code>no_proxy</code> Note that pip is run with "--isolated" on the CLI so PIP_<VAR>_<NAME> style env vars are ignored, but env vars that control requests and urllib3 can be passed. | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
-| extra_pip_args | Extra arguments to pass on to pip. Must not contain spaces. | List of strings | optional | [] |
-| isolated | Whether or not to pass the [--isolated](https://pip.pypa.io/en/stable/cli/pip/#cmdoption-isolated) flag to the underlying pip command. Alternatively, the <code>RULES_PYTHON_PIP_ISOLATED</code> enviornment varaible can be used to control this flag. | Boolean | optional | True |
-| pip_data_exclude | Additional data exclusion parameters to add to the pip packages BUILD file. | List of strings | optional | [] |
-| python_interpreter | The python interpreter to use. This can either be an absolute path or the name of a binary found on the host's <code>PATH</code> environment variable. If no value is set <code>python3</code> is defaulted for Unix systems and <code>python.exe</code> for Windows. | String | optional | "" |
-| python_interpreter_target | If you are using a custom python interpreter built by another repository rule, use this attribute to specify its BUILD target. This allows pip_repository to invoke pip using the same interpreter as your toolchain. If set, takes precedence over python_interpreter. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
-| quiet | If True, suppress printing stdout and stderr output to the terminal. | Boolean | optional | True |
-| repo_prefix | Prefix for the generated packages will be of the form<br><br>@<prefix><sanitized-package-name>//... | String | optional | "" |
-| requirements_darwin | Override the requirements_lock attribute when the host platform is Mac OS | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
-| requirements_linux | Override the requirements_lock attribute when the host platform is Linux | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
-| requirements_lock | A fully resolved 'requirements.txt' pip requirement file containing the transitive set of your dependencies. If this file is passed instead of 'requirements' no resolve will take place and pip_repository will create individual repositories for each of your dependencies so that wheels are fetched/built only for the targets specified by 'build/run/test'. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
-| requirements_windows | Override the requirements_lock attribute when the host platform is Windows | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
-| timeout | Timeout (in seconds) on the rule's execution duration. | Integer | optional | 600 |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="pip_repository-name"></a>name | A unique name for this repository. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
+| <a id="pip_repository-annotations"></a>annotations | Optional annotations to apply to packages | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | <code>{}</code> |
+| <a id="pip_repository-bzlmod"></a>bzlmod | Whether this repository rule is invoked under bzlmod, in which case we do not create the install_deps() macro. | Boolean | optional | <code>False</code> |
+| <a id="pip_repository-download_only"></a>download_only | Whether to use "pip download" instead of "pip wheel". Disables building wheels from source, but allows use of --platform, --python-version, --implementation, and --abi in --extra_pip_args to download wheels for a different platform from the host platform. | Boolean | optional | <code>False</code> |
+| <a id="pip_repository-enable_implicit_namespace_pkgs"></a>enable_implicit_namespace_pkgs | If true, disables conversion of native namespace packages into pkg-util style namespace packages. When set all py_binary and py_test targets must specify either <code>legacy_create_init=False</code> or the global Bazel option <code>--incompatible_default_to_explicit_init_py</code> to prevent <code>__init__.py</code> being automatically generated in every directory.<br><br>This option is required to support some packages which cannot handle the conversion to pkg-util style. | Boolean | optional | <code>False</code> |
+| <a id="pip_repository-environment"></a>environment | Environment variables to set in the pip subprocess. Can be used to set common variables such as <code>http_proxy</code>, <code>https_proxy</code> and <code>no_proxy</code> Note that pip is run with "--isolated" on the CLI so PIP_<VAR>_<NAME> style env vars are ignored, but env vars that control requests and urllib3 can be passed. | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | <code>{}</code> |
+| <a id="pip_repository-extra_pip_args"></a>extra_pip_args | Extra arguments to pass on to pip. Must not contain spaces. | List of strings | optional | <code>[]</code> |
+| <a id="pip_repository-isolated"></a>isolated | Whether or not to pass the [--isolated](https://pip.pypa.io/en/stable/cli/pip/#cmdoption-isolated) flag to the underlying pip command. Alternatively, the <code>RULES_PYTHON_PIP_ISOLATED</code> enviornment varaible can be used to control this flag. | Boolean | optional | <code>True</code> |
+| <a id="pip_repository-pip_data_exclude"></a>pip_data_exclude | Additional data exclusion parameters to add to the pip packages BUILD file. | List of strings | optional | <code>[]</code> |
+| <a id="pip_repository-python_interpreter"></a>python_interpreter | The python interpreter to use. This can either be an absolute path or the name of a binary found on the host's <code>PATH</code> environment variable. If no value is set <code>python3</code> is defaulted for Unix systems and <code>python.exe</code> for Windows. | String | optional | <code>""</code> |
+| <a id="pip_repository-python_interpreter_target"></a>python_interpreter_target | If you are using a custom python interpreter built by another repository rule, use this attribute to specify its BUILD target. This allows pip_repository to invoke pip using the same interpreter as your toolchain. If set, takes precedence over python_interpreter. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
+| <a id="pip_repository-quiet"></a>quiet | If True, suppress printing stdout and stderr output to the terminal. | Boolean | optional | <code>True</code> |
+| <a id="pip_repository-repo_mapping"></a>repo_mapping | A dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.<p>For example, an entry <code>"@foo": "@bar"</code> declares that, for any time this repository depends on <code>@foo</code> (such as a dependency on <code>@foo//some:target</code>, it should actually resolve that dependency within globally-declared <code>@bar</code> (<code>@bar//some:target</code>). | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | required | |
+| <a id="pip_repository-repo_prefix"></a>repo_prefix | Prefix for the generated packages will be of the form<br><br>@<prefix><sanitized-package-name>//... | String | optional | <code>""</code> |
+| <a id="pip_repository-requirements_darwin"></a>requirements_darwin | Override the requirements_lock attribute when the host platform is Mac OS | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
+| <a id="pip_repository-requirements_linux"></a>requirements_linux | Override the requirements_lock attribute when the host platform is Linux | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
+| <a id="pip_repository-requirements_lock"></a>requirements_lock | A fully resolved 'requirements.txt' pip requirement file containing the transitive set of your dependencies. If this file is passed instead of 'requirements' no resolve will take place and pip_repository will create individual repositories for each of your dependencies so that wheels are fetched/built only for the targets specified by 'build/run/test'. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
+| <a id="pip_repository-requirements_windows"></a>requirements_windows | Override the requirements_lock attribute when the host platform is Windows | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
+| <a id="pip_repository-timeout"></a>timeout | Timeout (in seconds) on the rule's execution duration. | Integer | optional | <code>600</code> |
-<a name="#whl_library"></a>
+<a id="whl_library"></a>
## whl_library
<pre>
whl_library(<a href="#whl_library-name">name</a>, <a href="#whl_library-annotation">annotation</a>, <a href="#whl_library-download_only">download_only</a>, <a href="#whl_library-enable_implicit_namespace_pkgs">enable_implicit_namespace_pkgs</a>, <a href="#whl_library-environment">environment</a>,
<a href="#whl_library-extra_pip_args">extra_pip_args</a>, <a href="#whl_library-isolated">isolated</a>, <a href="#whl_library-pip_data_exclude">pip_data_exclude</a>, <a href="#whl_library-python_interpreter">python_interpreter</a>, <a href="#whl_library-python_interpreter_target">python_interpreter_target</a>,
- <a href="#whl_library-quiet">quiet</a>, <a href="#whl_library-repo">repo</a>, <a href="#whl_library-repo_prefix">repo_prefix</a>, <a href="#whl_library-requirement">requirement</a>, <a href="#whl_library-timeout">timeout</a>)
+ <a href="#whl_library-quiet">quiet</a>, <a href="#whl_library-repo">repo</a>, <a href="#whl_library-repo_mapping">repo_mapping</a>, <a href="#whl_library-repo_prefix">repo_prefix</a>, <a href="#whl_library-requirement">requirement</a>, <a href="#whl_library-timeout">timeout</a>)
</pre>
@@ -94,25 +97,26 @@
| Name | Description | Type | Mandatory | Default |
-| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
-| name | A unique name for this repository. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
-| annotation | Optional json encoded file containing annotation to apply to the extracted wheel. See <code>package_annotation</code> | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
-| download_only | Whether to use "pip download" instead of "pip wheel". Disables building wheels from source, but allows use of --platform, --python-version, --implementation, and --abi in --extra_pip_args to download wheels for a different platform from the host platform. | Boolean | optional | False |
-| enable_implicit_namespace_pkgs | If true, disables conversion of native namespace packages into pkg-util style namespace packages. When set all py_binary and py_test targets must specify either <code>legacy_create_init=False</code> or the global Bazel option <code>--incompatible_default_to_explicit_init_py</code> to prevent <code>__init__.py</code> being automatically generated in every directory.<br><br>This option is required to support some packages which cannot handle the conversion to pkg-util style. | Boolean | optional | False |
-| environment | Environment variables to set in the pip subprocess. Can be used to set common variables such as <code>http_proxy</code>, <code>https_proxy</code> and <code>no_proxy</code> Note that pip is run with "--isolated" on the CLI so PIP_<VAR>_<NAME> style env vars are ignored, but env vars that control requests and urllib3 can be passed. | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
-| extra_pip_args | Extra arguments to pass on to pip. Must not contain spaces. | List of strings | optional | [] |
-| isolated | Whether or not to pass the [--isolated](https://pip.pypa.io/en/stable/cli/pip/#cmdoption-isolated) flag to the underlying pip command. Alternatively, the <code>RULES_PYTHON_PIP_ISOLATED</code> enviornment varaible can be used to control this flag. | Boolean | optional | True |
-| pip_data_exclude | Additional data exclusion parameters to add to the pip packages BUILD file. | List of strings | optional | [] |
-| python_interpreter | The python interpreter to use. This can either be an absolute path or the name of a binary found on the host's <code>PATH</code> environment variable. If no value is set <code>python3</code> is defaulted for Unix systems and <code>python.exe</code> for Windows. | String | optional | "" |
-| python_interpreter_target | If you are using a custom python interpreter built by another repository rule, use this attribute to specify its BUILD target. This allows pip_repository to invoke pip using the same interpreter as your toolchain. If set, takes precedence over python_interpreter. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
-| quiet | If True, suppress printing stdout and stderr output to the terminal. | Boolean | optional | True |
-| repo | Pointer to parent repo name. Used to make these rules rerun if the parent repo changes. | String | required | |
-| repo_prefix | Prefix for the generated packages will be of the form<br><br>@<prefix><sanitized-package-name>//... | String | optional | "" |
-| requirement | Python requirement string describing the package to make available | String | required | |
-| timeout | Timeout (in seconds) on the rule's execution duration. | Integer | optional | 600 |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="whl_library-name"></a>name | A unique name for this repository. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
+| <a id="whl_library-annotation"></a>annotation | Optional json encoded file containing annotation to apply to the extracted wheel. See <code>package_annotation</code> | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
+| <a id="whl_library-download_only"></a>download_only | Whether to use "pip download" instead of "pip wheel". Disables building wheels from source, but allows use of --platform, --python-version, --implementation, and --abi in --extra_pip_args to download wheels for a different platform from the host platform. | Boolean | optional | <code>False</code> |
+| <a id="whl_library-enable_implicit_namespace_pkgs"></a>enable_implicit_namespace_pkgs | If true, disables conversion of native namespace packages into pkg-util style namespace packages. When set all py_binary and py_test targets must specify either <code>legacy_create_init=False</code> or the global Bazel option <code>--incompatible_default_to_explicit_init_py</code> to prevent <code>__init__.py</code> being automatically generated in every directory.<br><br>This option is required to support some packages which cannot handle the conversion to pkg-util style. | Boolean | optional | <code>False</code> |
+| <a id="whl_library-environment"></a>environment | Environment variables to set in the pip subprocess. Can be used to set common variables such as <code>http_proxy</code>, <code>https_proxy</code> and <code>no_proxy</code> Note that pip is run with "--isolated" on the CLI so PIP_<VAR>_<NAME> style env vars are ignored, but env vars that control requests and urllib3 can be passed. | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | <code>{}</code> |
+| <a id="whl_library-extra_pip_args"></a>extra_pip_args | Extra arguments to pass on to pip. Must not contain spaces. | List of strings | optional | <code>[]</code> |
+| <a id="whl_library-isolated"></a>isolated | Whether or not to pass the [--isolated](https://pip.pypa.io/en/stable/cli/pip/#cmdoption-isolated) flag to the underlying pip command. Alternatively, the <code>RULES_PYTHON_PIP_ISOLATED</code> enviornment varaible can be used to control this flag. | Boolean | optional | <code>True</code> |
+| <a id="whl_library-pip_data_exclude"></a>pip_data_exclude | Additional data exclusion parameters to add to the pip packages BUILD file. | List of strings | optional | <code>[]</code> |
+| <a id="whl_library-python_interpreter"></a>python_interpreter | The python interpreter to use. This can either be an absolute path or the name of a binary found on the host's <code>PATH</code> environment variable. If no value is set <code>python3</code> is defaulted for Unix systems and <code>python.exe</code> for Windows. | String | optional | <code>""</code> |
+| <a id="whl_library-python_interpreter_target"></a>python_interpreter_target | If you are using a custom python interpreter built by another repository rule, use this attribute to specify its BUILD target. This allows pip_repository to invoke pip using the same interpreter as your toolchain. If set, takes precedence over python_interpreter. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
+| <a id="whl_library-quiet"></a>quiet | If True, suppress printing stdout and stderr output to the terminal. | Boolean | optional | <code>True</code> |
+| <a id="whl_library-repo"></a>repo | Pointer to parent repo name. Used to make these rules rerun if the parent repo changes. | String | required | |
+| <a id="whl_library-repo_mapping"></a>repo_mapping | A dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.<p>For example, an entry <code>"@foo": "@bar"</code> declares that, for any time this repository depends on <code>@foo</code> (such as a dependency on <code>@foo//some:target</code>, it should actually resolve that dependency within globally-declared <code>@bar</code> (<code>@bar//some:target</code>). | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | required | |
+| <a id="whl_library-repo_prefix"></a>repo_prefix | Prefix for the generated packages will be of the form<br><br>@<prefix><sanitized-package-name>//... | String | optional | <code>""</code> |
+| <a id="whl_library-requirement"></a>requirement | Python requirement string describing the package to make available | String | required | |
+| <a id="whl_library-timeout"></a>timeout | Timeout (in seconds) on the rule's execution duration. | Integer | optional | <code>600</code> |
-<a name="#locked_requirements_label"></a>
+<a id="locked_requirements_label"></a>
## locked_requirements_label
@@ -126,12 +130,16 @@
| Name | Description | Default Value |
-| :-------------: | :-------------: | :-------------: |
-| ctx | repository or module context | none |
-| attr | attributes for the repo rule or tag extension | none |
+| :------------- | :------------- | :------------- |
+| <a id="locked_requirements_label-ctx"></a>ctx | repository or module context | none |
+| <a id="locked_requirements_label-attr"></a>attr | attributes for the repo rule or tag extension | none |
+
+**RETURNS**
+
+Label
-<a name="#package_annotation"></a>
+<a id="package_annotation"></a>
## package_annotation
@@ -149,16 +157,20 @@
| Name | Description | Default Value |
-| :-------------: | :-------------: | :-------------: |
-| additive_build_content | Raw text to add to the generated <code>BUILD</code> file of a package. | <code>None</code> |
-| copy_files | A mapping of <code>src</code> and <code>out</code> files for [@bazel_skylib//rules:copy_file.bzl][cf] | <code>{}</code> |
-| copy_executables | A mapping of <code>src</code> and <code>out</code> files for [@bazel_skylib//rules:copy_file.bzl][cf]. Targets generated here will also be flagged as executable. | <code>{}</code> |
-| data | A list of labels to add as <code>data</code> dependencies to the generated <code>py_library</code> target. | <code>[]</code> |
-| data_exclude_glob | A list of exclude glob patterns to add as <code>data</code> to the generated <code>py_library</code> target. | <code>[]</code> |
-| srcs_exclude_glob | A list of labels to add as <code>srcs</code> to the generated <code>py_library</code> target. | <code>[]</code> |
+| :------------- | :------------- | :------------- |
+| <a id="package_annotation-additive_build_content"></a>additive_build_content | Raw text to add to the generated <code>BUILD</code> file of a package. | <code>None</code> |
+| <a id="package_annotation-copy_files"></a>copy_files | A mapping of <code>src</code> and <code>out</code> files for [@bazel_skylib//rules:copy_file.bzl][cf] | <code>{}</code> |
+| <a id="package_annotation-copy_executables"></a>copy_executables | A mapping of <code>src</code> and <code>out</code> files for [@bazel_skylib//rules:copy_file.bzl][cf]. Targets generated here will also be flagged as executable. | <code>{}</code> |
+| <a id="package_annotation-data"></a>data | A list of labels to add as <code>data</code> dependencies to the generated <code>py_library</code> target. | <code>[]</code> |
+| <a id="package_annotation-data_exclude_glob"></a>data_exclude_glob | A list of exclude glob patterns to add as <code>data</code> to the generated <code>py_library</code> target. | <code>[]</code> |
+| <a id="package_annotation-srcs_exclude_glob"></a>srcs_exclude_glob | A list of labels to add as <code>srcs</code> to the generated <code>py_library</code> target. | <code>[]</code> |
+
+**RETURNS**
+
+str: A json encoded string of the provided content.
-<a name="#use_isolated"></a>
+<a id="use_isolated"></a>
## use_isolated
@@ -172,8 +184,12 @@
| Name | Description | Default Value |
-| :-------------: | :-------------: | :-------------: |
-| ctx | repository or module context | none |
-| attr | attributes for the repo rule or tag extension | none |
+| :------------- | :------------- | :------------- |
+| <a id="use_isolated-ctx"></a>ctx | repository or module context | none |
+| <a id="use_isolated-attr"></a>attr | attributes for the repo rule or tag extension | none |
+
+**RETURNS**
+
+True if --isolated should be passed
diff --git a/docs/python.md b/docs/python.md
index bd14b82..1726ade 100755
--- a/docs/python.md
+++ b/docs/python.md
@@ -1,6 +1,10 @@
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
-<a name="#current_py_toolchain"></a>
+
+Core rules for building Python projects.
+
+
+<a id="current_py_toolchain"></a>
## current_py_toolchain
@@ -19,11 +23,11 @@
| Name | Description | Type | Mandatory | Default |
-| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
-| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="current_py_toolchain-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
-<a name="#py_import"></a>
+<a id="py_import"></a>
## py_import
@@ -45,13 +49,13 @@
| Name | Description | Type | Mandatory | Default |
-| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
-| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
-| deps | The list of other libraries to be linked in to the binary target. | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
-| srcs | The list of Python package files provided to Python targets that depend on this target. Note that currently only the .egg format is accepted. For .whl files, try the whl_library rule. We accept contributions to extend py_import to handle .whl. | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="py_import-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
+| <a id="py_import-deps"></a>deps | The list of other libraries to be linked in to the binary target. | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | <code>[]</code> |
+| <a id="py_import-srcs"></a>srcs | The list of Python package files provided to Python targets that depend on this target. Note that currently only the .egg format is accepted. For .whl files, try the whl_library rule. We accept contributions to extend py_import to handle .whl. | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | <code>[]</code> |
-<a name="#py_runtime_pair"></a>
+<a id="py_runtime_pair"></a>
## py_runtime_pair
@@ -74,8 +78,8 @@
```python
platform_common.ToolchainInfo(
- py2_runtime = <PyRuntimeInfo or None>,
- py3_runtime = <PyRuntimeInfo or None>,
+ py2_runtime = <PyRuntimeInfo or None>,
+ py3_runtime = <PyRuntimeInfo or None>,
)
```
@@ -106,7 +110,7 @@
toolchain(
name = "my_toolchain",
- target_compatible_with = <...>,
+ target_compatible_with = <...>,
toolchain = ":my_py_runtime_pair",
toolchain_type = "@rules_python//python:toolchain_type",
)
@@ -123,13 +127,13 @@
| Name | Description | Type | Mandatory | Default |
-| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
-| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
-| py2_runtime | The runtime to use for Python 2 targets. Must have <code>python_version</code> set to <code>PY2</code>. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
-| py3_runtime | The runtime to use for Python 3 targets. Must have <code>python_version</code> set to <code>PY3</code>. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="py_runtime_pair-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
+| <a id="py_runtime_pair-py2_runtime"></a>py2_runtime | The runtime to use for Python 2 targets. Must have <code>python_version</code> set to <code>PY2</code>. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
+| <a id="py_runtime_pair-py3_runtime"></a>py3_runtime | The runtime to use for Python 3 targets. Must have <code>python_version</code> set to <code>PY3</code>. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
-<a name="#py_binary"></a>
+<a id="py_binary"></a>
## py_binary
@@ -143,11 +147,11 @@
| Name | Description | Default Value |
-| :-------------: | :-------------: | :-------------: |
-| attrs | Rule attributes | none |
+| :------------- | :------------- | :------------- |
+| <a id="py_binary-attrs"></a>attrs | Rule attributes | none |
-<a name="#py_library"></a>
+<a id="py_library"></a>
## py_library
@@ -161,11 +165,11 @@
| Name | Description | Default Value |
-| :-------------: | :-------------: | :-------------: |
-| attrs | Rule attributes | none |
+| :------------- | :------------- | :------------- |
+| <a id="py_library-attrs"></a>attrs | Rule attributes | none |
-<a name="#py_runtime"></a>
+<a id="py_runtime"></a>
## py_runtime
@@ -179,11 +183,11 @@
| Name | Description | Default Value |
-| :-------------: | :-------------: | :-------------: |
-| attrs | Rule attributes | none |
+| :------------- | :------------- | :------------- |
+| <a id="py_runtime-attrs"></a>attrs | Rule attributes | none |
-<a name="#py_test"></a>
+<a id="py_test"></a>
## py_test
@@ -197,11 +201,11 @@
| Name | Description | Default Value |
-| :-------------: | :-------------: | :-------------: |
-| attrs | Rule attributes | none |
+| :------------- | :------------- | :------------- |
+| <a id="py_test-attrs"></a>attrs | Rule attributes | none |
-<a name="#find_requirements"></a>
+<a id="find_requirements"></a>
## find_requirements
@@ -218,7 +222,7 @@
| Name | Type |
-| :-------------: | :-------------: |
+| :------------- | :------------- |
| deps| String |
@@ -226,7 +230,7 @@
| Name | Description | Type | Mandatory | Default |
-| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
-| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="find_requirements-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
diff --git a/internal_deps.bzl b/internal_deps.bzl
index 8a089f0..a41d5fb 100644
--- a/internal_deps.bzl
+++ b/internal_deps.bzl
@@ -29,9 +29,9 @@
maybe(
http_archive,
name = "io_bazel_stardoc",
- url = "https://github.com/bazelbuild/stardoc/archive/0.4.0.tar.gz",
- sha256 = "6d07d18c15abb0f6d393adbd6075cd661a2219faab56a9517741f0fc755f6f3c",
- strip_prefix = "stardoc-0.4.0",
+ url = "https://github.com/bazelbuild/stardoc/archive/6f274e903009158504a9d9130d7f7d5f3e9421ed.tar.gz",
+ sha256 = "b5d6891f869d5b5a224316ec4dd9e9d481885a9b1a1c81eb846e20180156f2fa",
+ strip_prefix = "stardoc-6f274e903009158504a9d9130d7f7d5f3e9421ed",
)
maybe(