-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor third-party dependency configuration and quiet warnings
PiperOrigin-RevId: 390467159 Change-Id: Iaf4f2cbf865191f2f762c2f91eb862deef5a0863
- Loading branch information
1 parent
102de23
commit 9d99368
Showing
11 changed files
with
163 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2021 The TensorStore Authors | ||
# | ||
# 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. | ||
|
||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
|
||
def repo(): | ||
maybe( | ||
http_archive, | ||
name = "bazel_skylib", | ||
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz"], | ||
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2021 The TensorStore Authors | ||
# | ||
# 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. | ||
|
||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
|
||
def repo(): | ||
maybe( | ||
http_archive, | ||
name = "build_bazel_rules_nodejs", | ||
sha256 = "f533eeefc8fe1ddfe93652ec50f82373d0c431f7faabd5e6323f6903195ef227", | ||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.3.0/rules_nodejs-3.3.0.tar.gz"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
load("//third_party:bazel_skylib/workspace.bzl", repo_bazel_skylib = "repo") | ||
load("//third_party:build_bazel_rules_nodejs/workspace.bzl", repo_build_bazel_rules_nodejs = "repo") | ||
load("//third_party:com_facebook_zstd/workspace.bzl", repo_com_facebook_zstd = "repo") | ||
load("//third_party:com_github_nlohmann_json/workspace.bzl", repo_com_github_nlohmann_json = "repo") | ||
load("//third_party:com_github_pybind_pybind11/workspace.bzl", repo_com_github_pybind_pybind11 = "repo") | ||
load("//third_party:com_google_absl/workspace.bzl", repo_com_google_absl = "repo") | ||
load("//third_party:com_google_benchmark/workspace.bzl", repo_com_google_benchmark = "repo") | ||
load("//third_party:com_google_boringssl/workspace.bzl", repo_com_google_boringssl = "repo") | ||
load("//third_party:com_google_brotli/workspace.bzl", repo_com_google_brotli = "repo") | ||
load("//third_party:com_google_googletest/workspace.bzl", repo_com_google_googletest = "repo") | ||
load("//third_party:com_google_re2/workspace.bzl", repo_com_google_re2 = "repo") | ||
load("//third_party:com_google_snappy/workspace.bzl", repo_com_google_snappy = "repo") | ||
load("//third_party:jpeg/workspace.bzl", repo_jpeg = "repo") | ||
load("//third_party:nasm/workspace.bzl", repo_nasm = "repo") | ||
load("//third_party:net_sourceforge_half/workspace.bzl", repo_net_sourceforge_half = "repo") | ||
load("//third_party:net_zlib/workspace.bzl", repo_net_zlib = "repo") | ||
load("//third_party:org_blosc_cblosc/workspace.bzl", repo_org_blosc_cblosc = "repo") | ||
load("//third_party:org_lz4/workspace.bzl", repo_org_lz4 = "repo") | ||
load("//third_party:org_nghttp2/workspace.bzl", repo_org_nghttp2 = "repo") | ||
load("//third_party:org_sourceware_bzip2/workspace.bzl", repo_org_sourceware_bzip2 = "repo") | ||
load("//third_party:org_tukaani_xz/workspace.bzl", repo_org_tukaani_xz = "repo") | ||
load("//third_party:pypa/workspace.bzl", repo_pypa = "repo") | ||
load("//third_party:se_curl/workspace.bzl", repo_se_curl = "repo") | ||
|
||
def third_party_dependencies(): | ||
repo_bazel_skylib() | ||
repo_build_bazel_rules_nodejs() | ||
repo_com_facebook_zstd() | ||
repo_com_github_nlohmann_json() | ||
repo_com_github_pybind_pybind11() | ||
repo_com_google_absl() | ||
repo_com_google_benchmark() | ||
repo_com_google_boringssl() | ||
repo_com_google_brotli() | ||
repo_com_google_googletest() | ||
repo_com_google_re2() | ||
repo_com_google_snappy() | ||
repo_jpeg() | ||
repo_nasm() | ||
repo_net_sourceforge_half() | ||
repo_net_zlib() | ||
repo_org_blosc_cblosc() | ||
repo_org_lz4() | ||
repo_org_nghttp2() | ||
repo_org_sourceware_bzip2() | ||
repo_org_tukaani_xz() | ||
repo_pypa() | ||
repo_se_curl() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright 2021 The TensorStore Authors | ||
# | ||
# 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. | ||
"""Updates third_party.bzl file to import all third-party workspace files.""" | ||
|
||
import os | ||
|
||
|
||
def main(): | ||
script_dir = os.path.dirname(__file__) | ||
|
||
deps = [] | ||
for dep in os.listdir(script_dir): | ||
if not os.path.exists(os.path.join(script_dir, dep, 'workspace.bzl')): | ||
continue | ||
deps.append(dep) | ||
|
||
deps.sort() | ||
|
||
with open(os.path.join(script_dir, 'third_party.bzl'), 'w') as f: | ||
for dep in deps: | ||
f.write( | ||
f'load("//third_party:{dep}/workspace.bzl", repo_{dep} = "repo")\n') | ||
f.write('\n') | ||
f.write('def third_party_dependencies():\n') | ||
for dep in deps: | ||
f.write(f' repo_{dep}()\n') | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters