2025-08-22 14:24:22 +02:00
|
|
|
# Copyright 2010-2025 Google LLC
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
|
#
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
#
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
2024-11-15 14:40:16 +01:00
|
|
|
###############################################################################
|
|
|
|
|
# Bazel now uses Bzlmod by default to manage external dependencies.
|
|
|
|
|
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
|
|
|
|
|
#
|
|
|
|
|
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
|
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
|
|
module(
|
2025-03-13 15:45:20 +01:00
|
|
|
name = "or-tools",
|
2025-09-29 16:21:35 +02:00
|
|
|
version = "9.15",
|
2024-11-15 14:40:16 +01:00
|
|
|
)
|
|
|
|
|
|
2024-12-11 14:45:34 +01:00
|
|
|
# see https://registry.bazel.build/
|
2025-07-21 11:31:19 +02:00
|
|
|
# Bazel dependencies
|
2025-11-05 11:26:36 +01:00
|
|
|
bazel_dep(name = "bazel_skylib", version = "1.8.2")
|
2025-10-16 09:20:55 +02:00
|
|
|
bazel_dep(name = "contrib_rules_jvm", version = "0.28.0")
|
2025-07-21 11:31:19 +02:00
|
|
|
bazel_dep(name = "platforms", version = "1.0.0")
|
2025-11-05 11:26:36 +01:00
|
|
|
bazel_dep(name = "rules_cc", version = "0.2.9")
|
2025-07-21 11:31:19 +02:00
|
|
|
bazel_dep(name = "rules_go", version = "0.53.0")
|
2025-09-29 17:26:45 +02:00
|
|
|
bazel_dep(name = "rules_java", version = "8.14.0")
|
2025-07-21 11:31:19 +02:00
|
|
|
bazel_dep(name = "rules_jvm_external", version = "6.7")
|
|
|
|
|
bazel_dep(name = "rules_license", version = "1.0.0")
|
|
|
|
|
bazel_dep(name = "rules_proto", version = "7.1.0")
|
2025-11-17 10:40:00 +01:00
|
|
|
bazel_dep(name = "rules_python", version = "1.7.0")
|
2025-10-16 09:20:55 +02:00
|
|
|
bazel_dep(name = "rules_shell", version = "0.6.1")
|
2025-07-21 11:31:19 +02:00
|
|
|
|
|
|
|
|
# OR-Tools C++ dependencies
|
2025-10-16 09:20:55 +02:00
|
|
|
bazel_dep(name = "abseil-cpp", version = "20250814.1")
|
2025-04-06 22:27:07 +02:00
|
|
|
bazel_dep(name = "bzip2", version = "1.0.8.bcr.2")
|
2025-05-19 14:56:30 +02:00
|
|
|
bazel_dep(name = "eigen", version = "3.4.0.bcr.3")
|
2025-05-22 17:44:52 +02:00
|
|
|
bazel_dep(name = "glpk", version = "5.0.bcr.4")
|
2025-05-20 22:50:51 +02:00
|
|
|
bazel_dep(name = "google_benchmark", version = "1.9.2")
|
|
|
|
|
bazel_dep(name = "googletest", version = "1.17.0")
|
2025-06-06 15:05:39 +03:00
|
|
|
bazel_dep(name = "highs", version = "1.11.0")
|
2025-10-16 09:20:55 +02:00
|
|
|
bazel_dep(name = "protobuf-matchers", version = "0.1.1")
|
2025-09-16 16:25:04 +02:00
|
|
|
bazel_dep(name = "protobuf", version = "32.0")
|
|
|
|
|
bazel_dep(name = "re2", version = "2025-08-12")
|
2025-09-29 16:59:34 +02:00
|
|
|
bazel_dep(name = "scip", version = "9.2.3")
|
2025-09-29 17:26:45 +02:00
|
|
|
bazel_dep(name = "zlib", version = "1.3.1.bcr.7")
|
2024-11-15 14:40:16 +01:00
|
|
|
|
2025-07-21 11:31:19 +02:00
|
|
|
# OR-Tools wrappers dependencies
|
|
|
|
|
bazel_dep(name = "gazelle", version = "0.43.0")
|
|
|
|
|
bazel_dep(name = "pybind11_abseil", version = "202402.0")
|
2025-10-16 09:20:55 +02:00
|
|
|
bazel_dep(name = "pybind11_bazel", version = "2.13.6")
|
2025-07-21 11:31:19 +02:00
|
|
|
bazel_dep(name = "pybind11_protobuf", version = "0.0.0-20240524-1d7a729")
|
|
|
|
|
bazel_dep(name = "swig", version = "4.3.0")
|
|
|
|
|
|
2025-04-22 14:43:34 +02:00
|
|
|
git_override(
|
|
|
|
|
module_name = "pybind11_bazel",
|
|
|
|
|
commit = "2b6082a4d9d163a52299718113fa41e4b7978db5",
|
|
|
|
|
patch_strip = 1,
|
2025-10-16 14:05:15 +02:00
|
|
|
patches = ["//:patches/pybind11_bazel.patch"],
|
2025-04-22 14:43:34 +02:00
|
|
|
remote = "https://github.com/pybind/pybind11_bazel.git",
|
|
|
|
|
)
|
|
|
|
|
|
2024-11-15 14:40:16 +01:00
|
|
|
git_override(
|
|
|
|
|
module_name = "pybind11_abseil",
|
|
|
|
|
commit = "70f8b693b3b70573ca785ef62d9f48054f45d786",
|
|
|
|
|
patch_strip = 1,
|
2025-10-16 14:05:15 +02:00
|
|
|
patches = ["//:patches/pybind11_abseil.patch"],
|
2024-11-15 14:40:16 +01:00
|
|
|
remote = "https://github.com/pybind/pybind11_abseil.git",
|
|
|
|
|
)
|
|
|
|
|
|
2025-03-26 10:52:36 +01:00
|
|
|
git_override(
|
|
|
|
|
module_name = "pybind11_protobuf",
|
|
|
|
|
commit = "f02a2b7653bc50eb5119d125842a3870db95d251",
|
|
|
|
|
remote = "https://github.com/pybind/pybind11_protobuf.git",
|
|
|
|
|
)
|
|
|
|
|
|
2025-12-15 13:41:19 +01:00
|
|
|
# Python
|
|
|
|
|
# https://rules-python.readthedocs.io/en/latest/toolchains.html#library-modules-with-dev-only-python-usage
|
2024-11-15 14:40:16 +01:00
|
|
|
|
2025-11-05 11:26:36 +01:00
|
|
|
DEFAULT_PYTHON = "3.12"
|
2024-11-15 14:40:16 +01:00
|
|
|
|
2024-11-20 15:10:09 +01:00
|
|
|
python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency = True)
|
2025-12-15 13:41:19 +01:00
|
|
|
python.defaults(python_version = DEFAULT_PYTHON)
|
|
|
|
|
python.toolchain(python_version = DEFAULT_PYTHON)
|
2024-11-15 14:40:16 +01:00
|
|
|
|
|
|
|
|
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
|
2025-12-15 15:27:59 +01:00
|
|
|
|
2024-11-15 14:40:16 +01:00
|
|
|
[
|
|
|
|
|
pip.parse(
|
2025-12-15 13:41:19 +01:00
|
|
|
envsubst = ["PIP_INDEX_URL"],
|
|
|
|
|
experimental_index_url = "${PIP_INDEX_URL:-https://pypi.org/simple}",
|
|
|
|
|
hub_name = hub_name,
|
|
|
|
|
python_version = DEFAULT_PYTHON,
|
|
|
|
|
requirements_lock = requirements_lock,
|
2024-11-15 14:40:16 +01:00
|
|
|
)
|
2025-12-15 13:41:19 +01:00
|
|
|
for hub_name, requirements_lock in [
|
|
|
|
|
("ortools_pip_deps", "//bazel:ortools_requirements.txt"),
|
|
|
|
|
("ortools_notebook_deps", "//bazel:notebook_requirements.txt"),
|
|
|
|
|
]
|
2024-11-15 14:40:16 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
use_repo(pip, pip_deps = "ortools_pip_deps")
|
|
|
|
|
use_repo(pip, "ortools_notebook_deps")
|
|
|
|
|
|
2025-12-15 13:41:19 +01:00
|
|
|
# Java
|
|
|
|
|
|
2024-11-15 14:40:16 +01:00
|
|
|
JUNIT_PLATFORM_VERSION = "1.9.2"
|
|
|
|
|
|
|
|
|
|
JUNIT_JUPITER_VERSION = "5.9.2"
|
|
|
|
|
|
|
|
|
|
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
|
|
|
|
|
maven.install(
|
|
|
|
|
artifacts = [
|
|
|
|
|
"net.java.dev.jna:jna:5.14.0",
|
|
|
|
|
"com.google.truth:truth:0.32",
|
|
|
|
|
"org.junit.platform:junit-platform-launcher:%s" % JUNIT_PLATFORM_VERSION,
|
|
|
|
|
"org.junit.platform:junit-platform-reporting:%s" % JUNIT_PLATFORM_VERSION,
|
|
|
|
|
"org.junit.jupiter:junit-jupiter-api:%s" % JUNIT_JUPITER_VERSION,
|
|
|
|
|
"org.junit.jupiter:junit-jupiter-params:%s" % JUNIT_JUPITER_VERSION,
|
|
|
|
|
"org.junit.jupiter:junit-jupiter-engine:%s" % JUNIT_JUPITER_VERSION,
|
|
|
|
|
],
|
|
|
|
|
repositories = [
|
|
|
|
|
"https://repo1.maven.org/maven2",
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
use_repo(maven, "maven")
|
|
|
|
|
|
2025-05-20 22:50:51 +02:00
|
|
|
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
|
2024-11-15 14:40:16 +01:00
|
|
|
go_sdk.download(version = "1.22.4")
|
|
|
|
|
|
2025-05-20 22:50:51 +02:00
|
|
|
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
|
2024-11-15 14:40:16 +01:00
|
|
|
go_deps.module(
|
|
|
|
|
path = "github.com/golang/glog",
|
|
|
|
|
sum = "h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY=",
|
|
|
|
|
version = "v1.2.2",
|
|
|
|
|
)
|
|
|
|
|
go_deps.module(
|
|
|
|
|
path = "github.com/golang/protobuf",
|
2024-12-13 13:20:30 +01:00
|
|
|
sum = "h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=",
|
|
|
|
|
version = "v1.5.4",
|
2024-11-15 14:40:16 +01:00
|
|
|
)
|
|
|
|
|
go_deps.module(
|
|
|
|
|
path = "github.com/google/go-cmp",
|
|
|
|
|
sum = "h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=",
|
|
|
|
|
version = "v0.6.0",
|
|
|
|
|
)
|
|
|
|
|
go_deps.module(
|
|
|
|
|
path = "google.golang.org/protobuf",
|
2025-05-20 14:44:52 +02:00
|
|
|
sum = "h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=",
|
|
|
|
|
version = "v1.36.5",
|
2024-11-15 14:40:16 +01:00
|
|
|
)
|
|
|
|
|
go_deps.module(
|
|
|
|
|
path = "golang.org/x/xerrors",
|
|
|
|
|
sum = "h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=",
|
|
|
|
|
version = "v0.0.0-20191204190536-9bdfabe68543",
|
|
|
|
|
)
|
|
|
|
|
use_repo(
|
|
|
|
|
go_deps,
|
|
|
|
|
"com_github_golang_glog",
|
|
|
|
|
"com_github_golang_protobuf",
|
|
|
|
|
"com_github_google_go_cmp",
|
|
|
|
|
"org_golang_google_protobuf",
|
|
|
|
|
"org_golang_x_xerrors",
|
|
|
|
|
)
|