Skip to content

Commit cd6ab23

Browse files
authored
1 parent d64ab91 commit cd6ab23

File tree

4 files changed

+77
-1
lines changed

4 files changed

+77
-1
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
"""rules_pex"""
2+
3+
module(
4+
name = "rules_pex",
5+
version = "0.1.1",
6+
)
7+
8+
bazel_dep(name = "bazel_skylib", version = "1.8.2")
9+
bazel_dep(name = "platforms", version = "1.0.0")
10+
bazel_dep(name = "rules_python", version = "1.7.0")
11+
bazel_dep(name = "rules_shell", version = "0.6.1")
12+
13+
bazel_dep(name = "rules_rust_mdbook", version = "0.67.0", dev_dependency = True)
14+
bazel_dep(name = "stardoc", version = "0.8.0", dev_dependency = True, repo_name = "io_bazel_stardoc")
15+
16+
python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency = True)
17+
python.toolchain(
18+
configure_coverage_tool = True,
19+
# Working around a rules_python issue with docker
20+
# https://github.com/bazelbuild/rules_python/pull/713
21+
ignore_root_user_error = True,
22+
is_default = True,
23+
python_version = "3.11",
24+
)
25+
use_repo(
26+
python,
27+
"python_3_11_aarch64-apple-darwin",
28+
"python_3_11_aarch64-unknown-linux-gnu",
29+
"python_3_11_x86_64-apple-darwin",
30+
"python_3_11_x86_64-pc-windows-msvc",
31+
"python_3_11_x86_64-unknown-linux-gnu",
32+
python311 = "python_3_11",
33+
)
34+
35+
pex = use_extension("//pex:extensions.bzl", "pex", dev_dependency = True)
36+
pex.toolchain(
37+
name = "pex_toolchains",
38+
pex_version = "2.67.3",
39+
python_version = "3.11",
40+
scie_jump_version = "0.14.0",
41+
scie_ptex_version = "1.7.0",
42+
scie_science_version = "0.15.0",
43+
)
44+
pex.add_fallback_windows_binaries(
45+
toolchain_name = "pex_toolchains",
46+
)
47+
use_repo(
48+
pex,
49+
"pex_toolchains",
50+
)
51+
52+
register_toolchains(
53+
"@pex_toolchains//:all",
54+
dev_dependency = True,
55+
)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Note: This tests the rules_python integration example. The repository also contains
2+
# examples/rules_venv and examples/aspect_rules_py which demonstrate integration with
3+
# other Python rule sets. Only one test module path can be specified in bcr_test_module.
4+
bcr_test_module:
5+
module_path: "examples/rules_python"
6+
matrix:
7+
platform: ["ubuntu2004", "ubuntu2004_arm64", "macos_arm64"]
8+
bazel: ["7.x", "8.x"]
9+
tasks:
10+
run_test_module:
11+
name: "Run test module"
12+
platform: ${{ platform }}
13+
bazel: ${{ bazel }}
14+
build_targets:
15+
- "//..."
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"url": "https://github.com/UebelAndre/rules_pex/releases/download/0.1.1/rules_pex-0.1.1.tar.gz",
3+
"strip_prefix": "",
4+
"integrity": "sha256-IDfD63hzKBq+T2YhjiHyguTXTcVyZFFp2tHmFPzEdsI="
5+
}

modules/rules_pex/metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"github:bazel-contrib/rules_pex"
1414
],
1515
"versions": [
16-
"0.1.0"
16+
"0.1.0",
17+
"0.1.1"
1718
],
1819
"yanked_versions": {}
1920
}

0 commit comments

Comments
 (0)