diff --git a/modules/rules_pycross/0.5.1/MODULE.bazel b/modules/rules_pycross/0.5.1/MODULE.bazel new file mode 100644 index 0000000000..27be06b298 --- /dev/null +++ b/modules/rules_pycross/0.5.1/MODULE.bazel @@ -0,0 +1,69 @@ +"""rules_pycross""" + +module( + name = "rules_pycross", + version = "0.5.1", + compatibility_level = 1, +) + +bazel_dep(name = "aspect_bazel_lib", version = "1.38.1") +bazel_dep(name = "bazel_features", version = "1.1.1") +bazel_dep(name = "bazel_skylib", version = "1.4.2") +bazel_dep(name = "platforms", version = "0.0.4") +bazel_dep(name = "rules_python", version = "0.29.0") + +# Change this value to set the Python version we use in our repo venv. +PYTHON_VERSION = "3.12" + +py_underscore_version = PYTHON_VERSION.replace(".", "_") + +python = use_extension("@rules_python//python/extensions:python.bzl", "python") +python.toolchain(python_version = PYTHON_VERSION) +use_repo( + python, + "python_%s" % py_underscore_version, + "python_%s_host" % py_underscore_version, + "python_versions", + "pythons_hub", +) + +pycross = use_extension("@rules_pycross//pycross/extensions:pycross.bzl", "pycross") +pycross.configure_environments() +pycross.configure_interpreter( + python_defs_file = "@python_%s//:defs.bzl" % py_underscore_version, + python_interpreter_target = "@python_%s_host//:python" % py_underscore_version, +) +pycross.configure_toolchains() + +# TODO(jvolkman): Is there an easy way to not have to list these file repos? +use_repo( + pycross, + "rules_pycross_internal", + "rules_pycross_internal_deps_wheel_dacite_1.6.0_py3_none_any", + "rules_pycross_internal_deps_wheel_installer_0.7.0_py3_none_any", + "rules_pycross_internal_deps_wheel_packaging_23.2_py3_none_any", + "rules_pycross_internal_deps_wheel_pip_23.3.1_py3_none_any", + "rules_pycross_internal_deps_wheel_poetry_core_1.8.1_py3_none_any", + "rules_pycross_internal_deps_wheel_tomli_2.0.1_py3_none_any", +) + +toolchains = use_extension("@rules_pycross//pycross/private/bzlmod:toolchains.bzl", "toolchains") +toolchains.create_for_python_toolchains(name = "pycross_toolchains") +use_repo(toolchains, "pycross_toolchains") + +register_toolchains("@pycross_toolchains//...") + +environments = use_extension("@rules_pycross//pycross/extensions:environments.bzl", "environments") +environments.create_for_python_toolchains(name = "pycross_environments") +use_repo(environments, "pycross_environments") + +lock_import = use_extension("@rules_pycross//pycross/extensions:lock_import.bzl", "lock_import") +use_repo(lock_import, "lock_import_repos_hub") + +lock_repos = use_extension("@rules_pycross//pycross/extensions:lock_repos.bzl", "lock_repos") +lock_repos.create() + +# Currently development-only +bazel_dep(name = "gazelle", version = "0.35.0", dev_dependency = True) +bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True) +bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.5.0", dev_dependency = True) diff --git a/modules/rules_pycross/0.5.1/patches/module_dot_bazel_version.patch b/modules/rules_pycross/0.5.1/patches/module_dot_bazel_version.patch new file mode 100644 index 0000000000..5b4eec80af --- /dev/null +++ b/modules/rules_pycross/0.5.1/patches/module_dot_bazel_version.patch @@ -0,0 +1,14 @@ +=================================================================== +--- a/MODULE.bazel ++++ b/MODULE.bazel +@@ -1,9 +1,9 @@ + """rules_pycross""" + + module( + name = "rules_pycross", +- version = "0.0.0", ++ version = "0.5.1", + compatibility_level = 1, + ) + + bazel_dep(name = "aspect_bazel_lib", version = "1.38.1") diff --git a/modules/rules_pycross/0.5.1/presubmit.yml b/modules/rules_pycross/0.5.1/presubmit.yml new file mode 100644 index 0000000000..8ff7d8fb69 --- /dev/null +++ b/modules/rules_pycross/0.5.1/presubmit.yml @@ -0,0 +1,36 @@ +matrix: + platform: + - debian10 + - ubuntu2004 + - macos + - macos_arm64 + bazel: + - 7.x + - 6.x +tasks: + verify_targets: + name: Verify build targets + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - "@rules_pycross//pycross/..." +bcr_test_module: + module_path: tests/smoke_bzlmod + matrix: + platform: + - debian10 + - ubuntu2004 + - macos + - macos_arm64 + bazel: + - 7.x + - 6.x + tasks: + run_test_module: + name: Run test module + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - //... + test_targets: + - //... diff --git a/modules/rules_pycross/0.5.1/source.json b/modules/rules_pycross/0.5.1/source.json new file mode 100644 index 0000000000..c4e843103a --- /dev/null +++ b/modules/rules_pycross/0.5.1/source.json @@ -0,0 +1,9 @@ +{ + "integrity": "sha256-7cDMuLlaAGTxMPo+f11pCvnxICQ8q3KFiiZXOIR+PVE=", + "strip_prefix": "rules_pycross-0.5.1", + "url": "https://github.com/jvolkman/rules_pycross/releases/download/v0.5.1/rules_pycross-v0.5.1.tar.gz", + "patches": { + "module_dot_bazel_version.patch": "sha256-xxSObl4kbDgDhBjfAnESd7wCtItF3h8oFnuuM63Mbsg=" + }, + "patch_strip": 1 +} diff --git a/modules/rules_pycross/metadata.json b/modules/rules_pycross/metadata.json index 61e781397d..7d7dd64798 100644 --- a/modules/rules_pycross/metadata.json +++ b/modules/rules_pycross/metadata.json @@ -11,7 +11,8 @@ "github:jvolkman/rules_pycross" ], "versions": [ - "0.5.0" + "0.5.0", + "0.5.1" ], "yanked_versions": {} }