-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test Python dependencies now use rules_python Update deps PiperOrigin-RevId: 609078725
- Loading branch information
1 parent
1002ae3
commit 643372f
Showing
14 changed files
with
283 additions
and
160 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,92 @@ | ||
module( | ||
name = "pybind11_protobuf", | ||
version = "head", | ||
) | ||
|
||
bazel_dep( | ||
name = "bazel_skylib", | ||
version = "1.5.0", | ||
) | ||
|
||
bazel_dep( | ||
name = "abseil-cpp", | ||
version = "20230802.0.bcr.1", | ||
repo_name = "com_google_absl", | ||
) | ||
|
||
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
http_archive( | ||
name = "com_google_absl_py", | ||
sha256 = "8a3d0830e4eb4f66c4fa907c06edf6ce1c719ced811a12e26d9d3162f8471758", | ||
strip_prefix = "abseil-py-2.1.0", | ||
urls = [ | ||
"https://github.com/abseil/abseil-py/archive/refs/tags/v2.1.0.tar.gz", | ||
], | ||
) | ||
|
||
bazel_dep( | ||
name = "platforms", | ||
version = "0.0.8" | ||
) | ||
|
||
bazel_dep( | ||
name = "pybind11_bazel", | ||
version = "2.11.1.bzl.2", | ||
) | ||
|
||
bazel_dep( | ||
name = "protobuf", | ||
version = "23.1", | ||
repo_name = "com_google_protobuf" | ||
) | ||
|
||
bazel_dep( | ||
name = "grpc", | ||
version = "1.56.3.bcr.1", | ||
repo_name = "com_github_grpc_grpc", | ||
) | ||
|
||
bazel_dep( | ||
name = "rules_python", | ||
version = "0.31.0", | ||
) | ||
|
||
SUPPORTED_PYTHON_VERSIONS = [ | ||
"3.12", | ||
"3.11", | ||
"3.10", | ||
"3.9", | ||
"3.8" | ||
] | ||
|
||
DEFAULT_PYTHON = "3.11" | ||
|
||
python = use_extension("@rules_python//python/extensions:python.bzl", "python") | ||
[ | ||
python.toolchain( | ||
python_version = version, | ||
is_default = version == DEFAULT_PYTHON, | ||
) | ||
for version in SUPPORTED_PYTHON_VERSIONS | ||
] | ||
|
||
use_repo( | ||
python, | ||
python = "python_versions", | ||
) | ||
|
||
#### DEV ONLY DEPENDENCIES BELOW HERE #### | ||
|
||
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip", dev_dependency=True) | ||
[ | ||
pip.parse( | ||
hub_name = "pypi", | ||
python_version = version, | ||
requirements_lock = "//pybind11_protobuf/requirements:requirements_lock_" + version.replace('.','_') + ".txt", | ||
) | ||
for version in SUPPORTED_PYTHON_VERSIONS | ||
|
||
] | ||
|
||
use_repo(pip, "pypi") |
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 @@ | ||
# Empty file for cross-compatibility between MODULE.bazel and WORKSPACE |
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,34 @@ | ||
package( | ||
default_visibility = ["//visibility:private"], | ||
) | ||
|
||
load("@python//3.12:defs.bzl", compile_pip_requirements_3_12 = "compile_pip_requirements") | ||
load("@python//3.11:defs.bzl", compile_pip_requirements_3_11 = "compile_pip_requirements") | ||
load("@python//3.10:defs.bzl", compile_pip_requirements_3_10 = "compile_pip_requirements") | ||
load("@python//3.9:defs.bzl", compile_pip_requirements_3_9 = "compile_pip_requirements") | ||
load("@python//3.8:defs.bzl", compile_pip_requirements_3_8 = "compile_pip_requirements") | ||
compile_pip_requirements_3_12( | ||
name = "requirements_3_12", | ||
src = "requirements.in", | ||
requirements_txt = "requirements_lock_3_12.txt", | ||
) | ||
compile_pip_requirements_3_11( | ||
name = "requirements_3_11", | ||
src = "requirements.in", | ||
requirements_txt = "requirements_lock_3_11.txt", | ||
) | ||
compile_pip_requirements_3_10( | ||
name = "requirements_3_10", | ||
src = "requirements.in", | ||
requirements_txt = "requirements_lock_3_10.txt", | ||
) | ||
compile_pip_requirements_3_9( | ||
name = "requirements_3_9", | ||
src = "requirements.in", | ||
requirements_txt = "requirements_lock_3_9.txt", | ||
) | ||
compile_pip_requirements_3_8( | ||
name = "requirements_3_8", | ||
src = "requirements.in", | ||
requirements_txt = "requirements_lock_3_8.txt", | ||
) |
File renamed without changes.
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,10 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.10 | ||
# by the following command: | ||
# | ||
# bazel run //pybind11_protobuf/requirements:requirements_3_10.update | ||
# | ||
absl-py==2.1.0 \ | ||
--hash=sha256:526a04eadab8b4ee719ce68f204172ead1027549089702d99b9059f129ff1308 \ | ||
--hash=sha256:7820790efbb316739cde8b4e19357243fc3608a152024288513dd968d7d959ff | ||
# via -r pybind11_protobuf/requirements/requirements.in |
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,10 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.11 | ||
# by the following command: | ||
# | ||
# bazel run //pybind11_protobuf/requirements:requirements_3_11.update | ||
# | ||
absl-py==2.1.0 \ | ||
--hash=sha256:526a04eadab8b4ee719ce68f204172ead1027549089702d99b9059f129ff1308 \ | ||
--hash=sha256:7820790efbb316739cde8b4e19357243fc3608a152024288513dd968d7d959ff | ||
# via -r pybind11_protobuf/requirements/requirements.in |
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,10 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.12 | ||
# by the following command: | ||
# | ||
# bazel run //pybind11_protobuf/requirements:requirements_3_12.update | ||
# | ||
absl-py==2.1.0 \ | ||
--hash=sha256:526a04eadab8b4ee719ce68f204172ead1027549089702d99b9059f129ff1308 \ | ||
--hash=sha256:7820790efbb316739cde8b4e19357243fc3608a152024288513dd968d7d959ff | ||
# via -r pybind11_protobuf/requirements/requirements.in |
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,10 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.8 | ||
# by the following command: | ||
# | ||
# bazel run //pybind11_protobuf/requirements:requirements_3_8.update | ||
# | ||
absl-py==2.1.0 \ | ||
--hash=sha256:526a04eadab8b4ee719ce68f204172ead1027549089702d99b9059f129ff1308 \ | ||
--hash=sha256:7820790efbb316739cde8b4e19357243fc3608a152024288513dd968d7d959ff | ||
# via -r pybind11_protobuf/requirements/requirements.in |
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,10 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.9 | ||
# by the following command: | ||
# | ||
# bazel run //pybind11_protobuf/requirements:requirements_3_9.update | ||
# | ||
absl-py==2.1.0 \ | ||
--hash=sha256:526a04eadab8b4ee719ce68f204172ead1027549089702d99b9059f129ff1308 \ | ||
--hash=sha256:7820790efbb316739cde8b4e19357243fc3608a152024288513dd968d7d959ff | ||
# via -r pybind11_protobuf/requirements/requirements.in |
Oops, something went wrong.