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
2 changes: 2 additions & 0 deletions .github/workflows/ci-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
workspace:
- { path: ".", slug: "root", runner: "ubuntu-latest" }
- { path: "e2e/cases", slug: "e2e", runner: "ubuntu-22.04-32core" }
- { path: "e2e/crossbuild", slug: "e2e-crossbuild", runner: "ubuntu-22.04-32core" }
- { path: "e2e/interpreter-runtime-metadata", slug: "e2e-interpreter-runtime-metadata", runner: "ubuntu-latest" }
- { path: "e2e/interpreter-toolchain-settings", slug: "e2e-interpreter-toolchain-settings", runner: "ubuntu-latest" }
- { path: "e2e/interpreter-input-validation", slug: "e2e-interpreter-input-validation", runner: "ubuntu-latest" }
Expand Down Expand Up @@ -129,6 +130,7 @@ jobs:
workspace:
- { path: ".", slug: "root" }
- { path: "e2e/cases", slug: "e2e" }
- { path: "e2e/crossbuild", slug: "e2e-crossbuild" }
defaults:
run:
working-directory: ${{ matrix.workspace.path }}
Expand Down
10 changes: 10 additions & 0 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ workspace above must not carry: its `.bazelrc` turns on the rules_python provide
compatibility layer, so rules_python `py_*` targets can depend on a rules_py `py_library`.
Its `test.sh` asserts the same dependency is rejected with the flag off.

`crossbuild` hosts the rules_pycross ports (`pycross-*`): suites that force
packages to build from their sdists — pure-Python backends, setuptools C
extensions, pre/post-install patch phases, the distutils probe — and assert
properties of the resulting wheels, including rebuilding them under non-host
target platforms via `collect_wheels`. They live apart from `cases/` because
this workspace is where the cross-compilation test matrix grows, and their
sdist hubs carry package-specific overrides (`default_build_dependencies`,
patches, `resource_set`) that shouldn't leak onto unrelated cases sharing a
module — see its `MODULE.bazel` docstring.

Each isolated workspace points back at repo-root rules_py with
`local_path_override(path = "../..")`.

Expand Down
4 changes: 0 additions & 4 deletions e2e/cases/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ include("//oci:setup.MODULE.bazel")
include("//pbs-cc-toolchain:setup.MODULE.bazel")
include("//pth-namespace-547:setup.MODULE.bazel")
include("//pyarrow-dot-dir-1420:setup.MODULE.bazel")
include("//pycross-distutils-probe:setup.MODULE.bazel")
include("//pycross-patches:setup.MODULE.bazel")
include("//pycross-pure-python:setup.MODULE.bazel")
include("//pycross-setuptools:setup.MODULE.bazel")
include("//pytest-anyio-plugin:setup.MODULE.bazel")
include("//pytest-main-867:setup.MODULE.bazel")
include("//pytest-mock-530:setup.MODULE.bazel")
Expand Down
10 changes: 0 additions & 10 deletions e2e/cases/tools/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# Shared helpers consumed by //... via load("//tools:...").

load("@aspect_rules_py//py:defs.bzl", "py_binary")

# Consumed cross-package by the `assert_tar_listing` macro (//tools:asserts.bzl),
# which declares a py_test with this script as `main` in the caller's package.
exports_files([
"assert_absent.py",
"assert_ownership.py",
"check_wheel_tags.py",
])

platform(
Expand All @@ -18,10 +15,3 @@ platform(
],
visibility = ["//visibility:public"],
)

py_binary(
name = "collect_wheels_tool",
srcs = ["collect_wheels.py"],
main = "collect_wheels.py",
visibility = ["//visibility:public"],
)
15 changes: 15 additions & 0 deletions e2e/crossbuild/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Match Bazel 9's default. Without this, PySdistNativeBuild actions on
# Bazel 8 run without a default PATH, and clang's compiled-in default
# linker (`ld`, not bundled with the hermetic LLVM toolchain) can't be
# located. With it on, Bazel injects a static PATH=/bin:/usr/bin:/usr/local/bin
# so clang's PATH search hits the runner's /usr/bin/ld.
common --incompatible_strict_action_env

# Enable path mapping so WhlInstall actions are exercised with
# supports-path-mapping. Actions that declare the execution requirement get
# configuration-stripped cache keys; those that don't still work normally.
build --experimental_output_paths=strip

# Build without the bytes
common:ci --remote_download_outputs=minimal
common:ci --nobuild_runfile_links
7 changes: 7 additions & 0 deletions e2e/crossbuild/.bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
8.6.0
# The first line of this file is used by Bazelisk and Bazel to be sure
# the right version of Bazel is used to build and test this repo.
# This also defines which version is used on CI.
#
# Note that you should also run integration_tests against other Bazel
# versions you support.
54 changes: 54 additions & 0 deletions e2e/crossbuild/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
"""Isolated workspace for cross-platform source-build (crossbuild) suites.

Hosts the rules_pycross ports: every case here forces packages to build from
their sdists and asserts properties of the resulting wheels across target
platforms. They live apart from `e2e/cases` because this workspace is where
the cross-compilation test matrix grows; keeping the sdist-build hubs out of
the shared `cases/` module also keeps their package-specific overrides
(`default_build_dependencies`, patches, `resource_set`) from leaking onto
unrelated cases sharing that workspace.
"""

bazel_dep(name = "aspect_rules_py")
bazel_dep(name = "bazel_lib", version = "3.0.0")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "llvm", version = "0.8.3")

local_path_override(
module_name = "aspect_rules_py",
path = "../..",
)

interpreters = use_extension("@aspect_rules_py//py:extensions.bzl", "python_interpreters")
interpreters.configure(
releases = [
"20260303",
"20251031",
],
)
interpreters.toolchain(
python_version = "3.12",
)
interpreters.toolchain(
python_version = "3.13",
)
use_repo(interpreters, "python_interpreters")

register_toolchains("@python_interpreters//:all")

tools = use_extension("@aspect_rules_py//py:extensions.bzl", "py_tools")
tools.rules_py_tools()
use_repo(tools, "rules_py_tools")

register_toolchains("@rules_py_tools//:all")

register_toolchains("@llvm//toolchain:all")

uv_bin = use_extension("@aspect_rules_py//uv:extensions.bzl", "uv_bin")
uv_bin.toolchain(version = "0.11.21")
use_repo(uv_bin, "uv")

include("//pycross-distutils-probe:setup.MODULE.bazel")
include("//pycross-patches:setup.MODULE.bazel")
include("//pycross-pure-python:setup.MODULE.bazel")
include("//pycross-setuptools:setup.MODULE.bazel")
Loading
Loading