diff --git a/.bazelrc b/.bazelrc index 8501a48..98a6eee 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1 +1,2 @@ -test --test_output=errors \ No newline at end of file +test --test_output=errors +build --registry=https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c23f7ab..71f5816 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,14 +12,14 @@ jobs: matrix: include: # Build standard, native - - { name: "windows - native", os: windows-2022, command: "test", bazel_options: "", } + - { name: "windows - native", os: windows-2022, command: "test", bazel_options: "", } - { name: "ubuntu - native", os: ubuntu-latest, command: "test", bazel_options: "", } - { name: "macos - native", os: macos-latest, command: "test", bazel_options: "", } # Build bzlmod, native - - { name: "windows - bzlmod native", os: windows-2022, command: "test", bazel_options: "", } - - { name: "ubuntu - bzlmod native", os: ubuntu-latest, command: "test", bazel_options: "", } - - { name: "macos - bzlmod native", os: macos-latest, command: "test", bazel_options: "", } + - { name: "windows - bzlmod native", os: windows-2022, command: "test", config: "--enable_bzlmod", bazel_options: "", } + - { name: "ubuntu - bzlmod native", os: ubuntu-latest, command: "test", config: "--enable_bzlmod", bazel_options: "", } + - { name: "macos - bzlmod native", os: macos-latest, command: "test", config: "--enable_bzlmod", bazel_options: "", } name: "Build - ${{ matrix.name }}" runs-on: ${{ matrix.os }} diff --git a/BUILD.bazel b/BUILD.bazel index c852a6b..203baa4 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,5 +1,4 @@ load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") -load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain") load("@rules_python//python:pip.bzl", "compile_pip_requirements") # bazel build //:requirements.lock diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 0000000..4545b66 --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,34 @@ +module( + name = "rules_robotpy_utils", + version = "0.0.0", +) + +bazel_dep(name = "rules_python", version = "0.21.0") +bazel_dep(name = "rules_cc", version = "0.0.9") +bazel_dep(name = "aspect_bazel_lib", version = "1.39.0") +bazel_dep(name = "pybind11_bazel", version = "2.11.1") +bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2024-1") + +pip = use_extension("@rules_python//python:extensions.bzl", "pip") +pip.parse( + name = "rules_robotpy_utils_pip_deps", + requirements_lock = "//:requirements_lock.txt", +) +use_repo(pip, "rules_robotpy_utils_pip_deps") + +python_configure = use_extension("@pybind11_bazel//:python_configure.bzl", "extension") +python_configure.toolchain(python_version = "3") +use_repo(python_configure, "local_config_python", "pybind11") + + +python = use_extension("@rules_python//python:extensions.bzl", "python") +python.toolchain( + name = "python3_10", + ignore_root_user_error = True, + python_version = "3.10", +) +use_repo(python, "python3_10_toolchains") + +register_toolchains( + "@python3_10_toolchains//:all", +) diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod new file mode 100644 index 0000000..e69de29 diff --git a/requirements_darwin.txt b/requirements_darwin.txt index 2502c85..21dbe34 100644 --- a/requirements_darwin.txt +++ b/requirements_darwin.txt @@ -15,9 +15,7 @@ delocate==0.10.6 \ jinja2==3.0.0a1 \ --hash=sha256:c10142f819c2d22bdcd17548c46fa9b77cf4fda45097854c689666bf425e7484 \ --hash=sha256:c922560ac46888d47384de1dbdc3daaa2ea993af4b26a436dec31fa2c19ec668 - # via - # -r ./requirements.txt - # robotpy-build + # via robotpy-build markupsafe==2.1.2 \ --hash=sha256:0576fe974b40a400449768941d5d0858cc624e3249dfd1e0c33674e5c7ca7aed \ --hash=sha256:085fd3201e7b12809f9e6e9bc1e5c96a368c8523fad5afb02afe3c051ae4afcc \ @@ -180,13 +178,7 @@ pyyaml==6.0.1 \ robotpy-build==2024.0.0b5 \ --hash=sha256:1a0f7355ffd41839bd7fedb8c04b714b0d839562b0339c911e406d72143cb979 \ --hash=sha256:615274386912c583dface7a5b543a731812982e277414b0bb725c8af6bd4b89f - # via -r ./requirements.txt -setuptools==69.0.2 \ - --hash=sha256:1e8fdff6797d3865f37397be788a4e3cba233608e9b509382a2777d25ebde7f2 \ - --hash=sha256:735896e78a4742605974de002ac60562d286fa8051a7e2299445e8e8fbb01aa6 - # via - # robotpy-build - # setuptools-scm + # via -r requirements.txt setuptools-scm==7.1.0 \ --hash=sha256:6c508345a771aad7d56ebff0e70628bf2b0ec7573762be9960214730de278f27 \ --hash=sha256:73988b6d848709e2af142aa48c986ea29592bbcfca5375678064708205253d8e @@ -199,7 +191,6 @@ tomli==2.0.1 \ --hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \ --hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f # via - # -r ./requirements.txt # robotpy-build # setuptools-scm tomli-w==1.0.0 \ @@ -218,3 +209,11 @@ typing-extensions==4.8.0 \ # pydantic # robotpy-build # setuptools-scm + +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.0.2 \ + --hash=sha256:1e8fdff6797d3865f37397be788a4e3cba233608e9b509382a2777d25ebde7f2 \ + --hash=sha256:735896e78a4742605974de002ac60562d286fa8051a7e2299445e8e8fbb01aa6 + # via + # robotpy-build + # setuptools-scm