| "aspect-build/rules_py" |
| |
| module( |
| name = "aspect_rules_py", |
| compatibility_level = 1, |
| version = "2.0.0-alpha.3", |
| ) |
| |
| bazel_dep(name = "bazel_features", version = "1.38.0") |
| bazel_dep(name = "bazel_lib", version = "3.0.0") |
| bazel_dep(name = "bazel_skylib", version = "1.4.2") |
| bazel_dep(name = "gawk", version = "5.3.2.bcr.7") |
| bazel_dep(name = "platforms", version = "1.0.0") |
| bazel_dep(name = "rules_cc", version = "0.2.16") |
| bazel_dep(name = "rules_pkg", version = "1.1.0") |
| |
| # TODO: when bumping to 1.9.0+, replace py/private/exec_tools/defs.bzl with |
| # rules_python's public py_exec_tools_toolchain and PyExecToolsInfo, and switch |
| # EXEC_TOOLS_TOOLCHAIN back to @rules_python//python:exec_tools_toolchain_type. |
| bazel_dep(name = "rules_python", version = "1.0.0") |
| bazel_dep(name = "rules_shell", version = "0.6.1") |
| bazel_dep(name = "tar.bzl", version = "0.10.1") |
| bazel_dep(name = "with_cfg.bzl", version = "0.14.6") |
| bazel_dep(name = "hermetic_launcher", version = "0.0.9") |
| |
| bazel_lib_toolchains = use_extension("@tar.bzl//tar:extensions.bzl", "toolchains") |
| use_repo(bazel_lib_toolchains, "bsd_tar_toolchains") |
| |
| tools = use_extension("//py:extensions.bzl", "py_tools") |
| tools.rules_py_tools() |
| use_repo(tools, "rules_py_tools") |
| use_repo(tools, "rules_py_pex_2_3_1") |
| |
| register_toolchains( |
| "@rules_py_tools//:all", |
| ) |
| |
| http_file = use_repo_rule( |
| "@bazel_tools//tools/build_defs/repo:http.bzl", |
| "http_file", |
| ) |
| |
| [ |
| http_file( |
| name = "toml2json_" + name, |
| executable = True, |
| sha256 = sha256, |
| url = "https://github.com/hermeticbuild/toml2json/releases/download/v0.0.26/toml2json_" + name + ext, |
| ) |
| for name, sha256, ext in [ |
| ("darwin_amd64", "632da497331d7aa5f2dd36b7c3c4339639e203bbafa56db77f0bb46cf46089a6", ""), |
| ("darwin_arm64", "13e000bb10f66fd3eb7e72c1fbb382a72859fefb9a75b99173728b0136bd932f", ""), |
| ("linux_amd64", "87921b36ceb343af152fc988be59eec49ac9865f2e499a48152bed03e66f8228", ""), |
| ("linux_arm64", "b271e043e58814353a3f289fb7ce78198d742e730149325d0622d71f3d8595b5", ""), |
| ("windows_amd64", "3fb037472c7ec2485b1c965253404841bfa32d571489b76dfbbc1c7ad6848884", ".exe"), |
| ("windows_arm64", "f825f7b6aea181bb050d4112d3234ec4ef0de45fadc9e6f99c0adcb08db9cf64", ".exe"), |
| ] |
| ] |
| |
| host = use_extension("//uv/private/host:extension.bzl", "host_platform") |
| use_repo(host, "aspect_rules_py_uv_host") |
| |
| # PBS interpreters — used at repo-rule time for sdist inspection (needs >= 3.11 |
| # for tomllib) and available as build-time toolchains. |
| interpreters = use_extension("//py:extensions.bzl", "python_interpreters") |
| interpreters.configure( |
| releases = [ |
| "20260303", |
| "20251031", |
| ], |
| ) |
| interpreters.toolchain( |
| python_version = "3.13", |
| ) |
| use_repo( |
| interpreters, |
| "python_interpreters", |
| # Individual platform repos — must be visible so the uv extension can |
| # reference the host interpreter for sdist configure tooling. |
| "python_3_13_aarch64_apple_darwin", |
| "python_3_13_aarch64_unknown_linux_gnu", |
| "python_3_13_aarch64_unknown_linux_musl", |
| "python_3_13_i686_pc_windows_msvc", |
| "python_3_13_x86_64_apple_darwin", |
| "python_3_13_x86_64_pc_windows_msvc", |
| "python_3_13_x86_64_unknown_linux_gnu", |
| "python_3_13_x86_64_unknown_linux_musl", |
| ) |
| |
| register_toolchains("@python_interpreters//:all") |
| |
| bazel_dep(name = "aspect_tools_telemetry", version = "0.3.3") |
| |
| tel = use_extension("@aspect_tools_telemetry//:extension.bzl", "telemetry") |
| use_repo(tel, "aspect_tools_telemetry_report") |
| |
| ################################################################################ |
| # Dev deps are the remainder of the file |
| |
| # LLVM configuration |
| bazel_dep(name = "llvm", version = "0.8.3", dev_dependency = True) |
| |
| register_toolchains( |
| "@llvm//toolchain:all", |
| dev_dependency = True, |
| ) |
| |
| osx = use_extension("@llvm//extensions:osx.bzl", "osx", dev_dependency = True) |
| use_repo(osx, "macos_sdk") |
| |
| bazel_dep(name = "aspect_gazelle_prebuilt", version = "0.0.18", dev_dependency = True) |
| bazel_dep(name = "buildifier_prebuilt", version = "8.5.1.2", dev_dependency = True) |
| bazel_dep(name = "bazelrc-preset.bzl", version = "1.9.2", dev_dependency = True) |
| bazel_dep(name = "bazel_env.bzl", version = "0.5.0", dev_dependency = True) |
| bazel_dep(name = "rules_multitool", version = "1.9.0", dev_dependency = True) |
| |
| multitool = use_extension("@rules_multitool//multitool:extension.bzl", "multitool", dev_dependency = True) |
| multitool.hub(lockfile = "//tools:tools.lock.json") |
| use_repo(multitool, "multitool") |
| |
| # TODO: Replace with bazel_features? |
| # cf. https://github.com/bazel-contrib/bazelrc-preset.bzl/blob/main/MODULE.bazel#L8C1-L10C70 |
| |
| version = use_extension("@bazel_features//private:extensions.bzl", "version_extension") |
| use_repo(version, "bazel_features_globals", "bazel_features_version") |
| |
| # rules_oci and friends |
| |
| # rules_python and friends |
| python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency = True) |
| python.toolchain( |
| is_default = True, |
| python_version = "3.9", |
| ) |
| python.toolchain( |
| is_default = False, |
| python_version = "3.12", |
| ) |
| |
| # We still use pip for testing the virtual deps machinery |
| pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip", dev_dependency = True) |
| pip.parse( |
| hub_name = "django", |
| python_version = "3.9", |
| requirements_lock = "//py/tests/virtual/django:requirements.txt", |
| ) |
| use_repo(pip, "django") |
| |
| # For everything else, we use our own uv machinery |
| uv_bin = use_extension("//uv:extensions.bzl", "uv_bin", dev_dependency = True) |
| uv_bin.toolchain() |
| use_repo(uv_bin, "uv") |
| |
| uv = use_extension("//uv:extensions.bzl", "uv", dev_dependency = True) |
| uv.declare_hub( |
| hub_name = "pypi", |
| ) |
| uv.project( |
| name = "aspect_rules_py", |
| default_build_dependencies = [ |
| "build", |
| "setuptools", |
| "maturin", |
| ], |
| hub_name = "pypi", |
| lock = "//:uv.lock", |
| pyproject = "//:pyproject.toml", |
| ) |
| uv.unstable_annotate_packages( |
| src = "//:annotations.toml", |
| lock = "//:uv.lock", |
| ) |
| use_repo( |
| uv, |
| "aspect_rules_py_pip_configurations", |
| "project__aspect_rules_py", |
| "pypi", |
| "sdist_build__aspect_rules_py__bravado__11_0_3", |
| "sdist_build__aspect_rules_py__bravado_core__6_1_1", |
| "whl_install__aspect_rules_py__attrs__23_2_0", |
| ) |
| |
| register_toolchains( |
| "@uv//:all", |
| dev_dependency = True, |
| ) |
| |
| http_file( |
| name = "django_4_2_4", |
| dev_dependency = True, |
| downloaded_file_path = "Django-4.2.4-py3-none-any.whl", |
| sha256 = "860ae6a138a238fc4f22c99b52f3ead982bb4b1aad8c0122bcd8c8a3a02e409d", |
| urls = ["https://files.pythonhosted.org/packages/7f/9e/fc6bab255ae10bc57fa2f65646eace3d5405fbb7f5678b90140052d1db0f/Django-4.2.4-py3-none-any.whl"], |
| ) |
| |
| http_file( |
| name = "django_4_1_10", |
| dev_dependency = True, |
| downloaded_file_path = "Django-4.1.10-py3-none-any.whl", |
| sha256 = "26d0260c2fb8121009e62ffc548b2398dea2522b6454208a852fb0ef264c206c", |
| urls = ["https://files.pythonhosted.org/packages/34/25/8a218de57fc9853297a1a8e4927688eff8107d5bc6dcf6c964c59801f036/Django-4.1.10-py3-none-any.whl"], |
| ) |
| |
| http_file( |
| name = "sqlparse_0_4_0", |
| dev_dependency = True, |
| downloaded_file_path = "sqlparse-0.4.0-py3-none-any.whl", |
| sha256 = "0523026398aea9c8b5f7a4a6d5c0829c285b4fbd960c17b5967a369342e21e01", |
| urls = ["https://files.pythonhosted.org/packages/10/96/36c136013c4a6ecb8c6aa3eed66e6dcea838f85fd80e1446499f1dabfac7/sqlparse-0.4.0-py3-none-any.whl"], |
| ) |