Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions pex/defs.bzl
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
"""# Pex
"""# rules_pex

Bazel rules for the Python executable packaging tool [pex](https://docs.pex-tool.org/).

### Setup
## Setup

Below is an example of how to quickly setup toolchains which power the Pex rules. For details
on customizing toolchains, please see the [`pex`](#pex) module extension or
[`py_pex_toolchain`](#py_pex_toolchain) rule.

```python
bazel_dep(name = "rules_pex", version = "{version}")

pex = use_extension("//pex:extensions.bzl", "pex")
pex = use_extension("@rules_pex//pex:extensions.bzl", "pex")
pex.toolchain(
name = "pex_toolchains",
)
Expand All @@ -19,7 +23,6 @@ use_repo(

register_toolchains(
"@pex_toolchains//:all",
dev_dependency = True,
)
```
"""
Expand Down
6 changes: 3 additions & 3 deletions pex/extensions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ An extension for defining a pex toolchain.
An example of defining and using a pex toolchain:

```python
pex = use_extension("//pex:extensions.bzl", "pex")
pex = use_extension("@rules_pex//pex:extensions.bzl", "pex")
pex.toolchain(
name = "pex_toolchains",
pex_version = "2.67.3",
Expand Down Expand Up @@ -350,11 +350,11 @@ This tag is used to add fallback binaries for Windows platforms when the actual
pex tools don't support Windows. This prevents toolchain resolution failures in
multi-platform repositories.

Note: Full Windows support is tracked in https://github.com/UebelAndre/rules_pex/issues/1
Note: Full Windows support is tracked in <https://github.com/UebelAndre/rules_pex/issues/1>

Example:
```python
pex = use_extension("//pex:extensions.bzl", "pex")
pex = use_extension("@rules_pex//pex:extensions.bzl", "pex")
pex.toolchain(
name = "pex_toolchains",
python_version = "3.11",
Expand Down
Loading