|
| 1 | +############################################################################### |
| 2 | +# Bazel now uses Bzlmod by default to manage external dependencies. |
| 3 | +# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. |
| 4 | +# |
| 5 | +# For more details, please check https://github.com/bazelbuild/bazel/issues/18958 |
| 6 | +############################################################################### |
| 7 | + |
| 8 | +OR_TOOLS_VERSION = "10.0.0" |
| 9 | + |
| 10 | +module( |
| 11 | + name = "or-tools", |
| 12 | + repo_name = "com_google_ortools", |
| 13 | + version = OR_TOOLS_VERSION, |
| 14 | +) |
| 15 | + |
| 16 | +bazel_dep(name = "abseil-cpp", version = "20240722.0", repo_name = "com_google_absl") |
| 17 | +bazel_dep(name = "bazel_skylib", version = "1.7.1") |
| 18 | +bazel_dep(name = "contrib_rules_jvm", version = "0.27.0") |
| 19 | +bazel_dep(name = "eigen", version = "3.4.0.bcr.1") |
| 20 | +bazel_dep(name = "gazelle", version = "0.39.1", repo_name = "bazel_gazelle") |
| 21 | +bazel_dep(name = "glpk", version = "5.0.bcr.1") |
| 22 | +bazel_dep(name = "google_benchmark", version = "1.8.5", repo_name = "com_google_benchmark") |
| 23 | +bazel_dep(name = "googletest", version = "1.15.2", repo_name = "com_google_googletest") |
| 24 | +bazel_dep(name = "highs", version = "1.8.0") |
| 25 | +bazel_dep(name = "platforms", version = "0.0.10") |
| 26 | +bazel_dep(name = "protobuf", version = "28.3", repo_name = "com_google_protobuf") |
| 27 | +bazel_dep(name = "pybind11_abseil", version = "202402.0", repo_name = "org_pybind11_abseil") |
| 28 | +bazel_dep(name = "pybind11_bazel", version = "2.13.6") |
| 29 | +bazel_dep(name = "pybind11_protobuf", version = "0.0.0-20240524-1d7a729") |
| 30 | +bazel_dep(name = "re2", version = "2024-07-02", repo_name = "com_google_re2") |
| 31 | +bazel_dep(name = "rules_cc", version = "0.0.10") |
| 32 | +bazel_dep(name = "rules_go", version = "0.50.1", repo_name = "io_bazel_rules_go") |
| 33 | +bazel_dep(name = "rules_java", version = "7.12.2") |
| 34 | +bazel_dep(name = "rules_jvm_external", version = "6.4") |
| 35 | +bazel_dep(name = "rules_license", version = "1.0.0") |
| 36 | +bazel_dep(name = "rules_proto", version = "6.0.2") |
| 37 | +bazel_dep(name = "rules_python", version = "0.37.2") |
| 38 | +bazel_dep(name = "scip", version = "8.1.0") |
| 39 | +bazel_dep(name = "swig", version = "4.2.0") |
| 40 | +bazel_dep(name = "zlib", version = "1.3.1.bcr.3") |
| 41 | + |
| 42 | +git_override( |
| 43 | + module_name = "pybind11_abseil", |
| 44 | + commit = "70f8b693b3b70573ca785ef62d9f48054f45d786", |
| 45 | + patches = ["//patches:pybind11_abseil.patch"], |
| 46 | + patch_strip = 1, |
| 47 | + remote = "https://github.com/pybind/pybind11_abseil.git", |
| 48 | +) |
| 49 | + |
| 50 | +SUPPORTED_PYTHON_VERSIONS = [ |
| 51 | + "3.8", |
| 52 | + "3.9", |
| 53 | + "3.10", |
| 54 | + "3.11", |
| 55 | + "3.12", |
| 56 | + "3.13", |
| 57 | +] |
| 58 | + |
| 59 | +DEFAULT_PYTHON = "3.11" |
| 60 | + |
| 61 | +python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency=True) |
| 62 | +[ |
| 63 | + python.toolchain( |
| 64 | + ignore_root_user_error = True, # needed for CI |
| 65 | + python_version = version, |
| 66 | + is_default = version == DEFAULT_PYTHON, |
| 67 | + ) |
| 68 | + for version in SUPPORTED_PYTHON_VERSIONS |
| 69 | +] |
| 70 | + |
| 71 | +pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") |
| 72 | + |
| 73 | +[ |
| 74 | + pip.parse( |
| 75 | + hub_name = "ortools_pip_deps", |
| 76 | + python_version = python_version, |
| 77 | + requirements_lock = "//bazel:ortools_requirements.txt", |
| 78 | + ) |
| 79 | + for python_version in SUPPORTED_PYTHON_VERSIONS |
| 80 | +] |
| 81 | + |
| 82 | +[ |
| 83 | + pip.parse( |
| 84 | + hub_name = "ortools_notebook_deps", |
| 85 | + python_version = python_version, |
| 86 | + requirements_lock = "//bazel:notebook_requirements.txt", |
| 87 | + ) |
| 88 | + for python_version in SUPPORTED_PYTHON_VERSIONS |
| 89 | +] |
| 90 | + |
| 91 | +use_repo(pip, pip_deps = "ortools_pip_deps") |
| 92 | +use_repo(pip, "ortools_notebook_deps") |
| 93 | + |
| 94 | +JUNIT_PLATFORM_VERSION = "1.9.2" |
| 95 | + |
| 96 | +JUNIT_JUPITER_VERSION = "5.9.2" |
| 97 | + |
| 98 | +maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") |
| 99 | +maven.install( |
| 100 | + artifacts = [ |
| 101 | + "net.java.dev.jna:jna:5.14.0", |
| 102 | + "com.google.truth:truth:0.32", |
| 103 | + "org.junit.platform:junit-platform-launcher:%s" % JUNIT_PLATFORM_VERSION, |
| 104 | + "org.junit.platform:junit-platform-reporting:%s" % JUNIT_PLATFORM_VERSION, |
| 105 | + "org.junit.jupiter:junit-jupiter-api:%s" % JUNIT_JUPITER_VERSION, |
| 106 | + "org.junit.jupiter:junit-jupiter-params:%s" % JUNIT_JUPITER_VERSION, |
| 107 | + "org.junit.jupiter:junit-jupiter-engine:%s" % JUNIT_JUPITER_VERSION, |
| 108 | + ], |
| 109 | + repositories = [ |
| 110 | + "https://repo1.maven.org/maven2", |
| 111 | + ], |
| 112 | +) |
| 113 | +use_repo(maven, "maven") |
| 114 | + |
| 115 | +go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk") |
| 116 | +go_sdk.download(version = "1.22.4") |
| 117 | + |
| 118 | +go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") |
| 119 | +go_deps.module( |
| 120 | + path = "github.com/golang/glog", |
| 121 | + sum = "h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY=", |
| 122 | + version = "v1.2.2", |
| 123 | +) |
| 124 | +go_deps.module( |
| 125 | + path = "github.com/golang/protobuf", |
| 126 | + sum = "h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4=", |
| 127 | + version = "v1.5.0", |
| 128 | +) |
| 129 | +go_deps.module( |
| 130 | + path = "github.com/google/go-cmp", |
| 131 | + sum = "h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=", |
| 132 | + version = "v0.6.0", |
| 133 | +) |
| 134 | +go_deps.module( |
| 135 | + path = "google.golang.org/protobuf", |
| 136 | + sum = "h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=", |
| 137 | + version = "v1.34.2", |
| 138 | +) |
| 139 | +go_deps.module( |
| 140 | + path = "golang.org/x/xerrors", |
| 141 | + sum = "h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=", |
| 142 | + version = "v0.0.0-20191204190536-9bdfabe68543", |
| 143 | +) |
| 144 | +use_repo( |
| 145 | + go_deps, |
| 146 | + "com_github_golang_glog", |
| 147 | + "com_github_golang_protobuf", |
| 148 | + "com_github_google_go_cmp", |
| 149 | + "org_golang_google_protobuf", |
| 150 | + "org_golang_x_xerrors", |
| 151 | +) |
0 commit comments