Skip to content
Draft
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
15 changes: 14 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ common --enable_bzlmod

common --test_output=errors

# Windows settings
startup --windows_enable_symlinks

# Point tools such as coursier (used in rules_jvm_external) to Bazel's downloaded JDK
# suggested in https://github.com/bazelbuild/rules_jvm_external/issues/445
common --repo_env=JAVA_HOME=../bazel_tools/jdk
common --action_env=JAVA_HOME=../bazel_tools/jdk

# Define value used by tests
common --define=SOME_VAR=SOME_VALUE

Expand All @@ -17,7 +25,9 @@ common --per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_B
common --host_per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT

# Don't try and auto detect the cc toolchain, as we use our own gcc toolchains.
common --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
# Except on windows, where we use msvc
common:linux --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
common:macos --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1

# Don't link against libunwind on macos as it causes linking failures (https://github.com/bazel-contrib/toolchains_llvm/pull/346)
common:macos --@toolchains_llvm//toolchain/config:libunwind=False
Expand All @@ -34,6 +44,9 @@ common:release --@rules_rust//:extra_rustc_flags=-Cpanic=abort
common:nollvm --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=0
common:nollvm --noincompatible_enable_cc_toolchain_resolution

# Do not tempt developer to update dependencies in this ruleset
common --check_direct_dependencies=off

# Load any settings specific to the current user.
# .bazelrc.user should appear in .gitignore so that settings are not shared with team members
# This needs to be last statement in this
Expand Down
7 changes: 7 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ load("//uv/private/manifest:defs.bzl", "gazelle_python_manifest")
# gazelle:exclude examples/django
# gazelle:map_kind bzl_library bzl_library @bazel_lib//:bzl_library.bzl

not_windows = select({
"@platforms//os:windows": ["@platforms//:incompatible"],
"//conditions:default": [],
})

gazelle_python_manifest(
name = "gazelle_python_manifest",
hub = "pypi",
Expand All @@ -19,11 +24,13 @@ gazelle_python_manifest(
gazelle(
name = "gazelle",
gazelle = "@multitool//tools/gazelle",
target_compatible_with = not_windows,
)

compile_pip_requirements(
name = "requirements",
extra_args = ["--allow-unsafe"],
requirements_in = "requirements.in",
requirements_txt = "requirements.txt",
requirements_windows = "requirements_windows.txt",
)
Loading