Skip to content

Commit ab15622

Browse files
committed
add required deps
1 parent 4977201 commit ab15622

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.generator/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ RUN apt-get update && \
2222
# For downloading secure files
2323
wget \
2424
ca-certificates \
25+
# For running bazelisk commands
26+
openjdk-17-jdk \
2527
# --- Critical libraries for a complete Python build ---
2628
libssl-dev \
2729
zlib1g-dev \
@@ -35,7 +37,7 @@ RUN apt-get update && \
3537

3638
# Set up environment variables for tool versions to make updates easier.
3739
ENV PYTHON_VERSION=3.11.5
38-
ENV BAZELISK_VERSION=v1.19.0
40+
ENV BAZELISK_VERSION=v1.26.0
3941

4042
# Create a symbolic link for `python3` to point to our specific version.
4143
ENV PATH /usr/local/bin/python3.11:$PATH

.generator/cli.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
LIBRARIAN_DIR = "librarian"
2525
GENERATE_REQUEST_FILE = "generate-request.json"
26+
SOURCE_DIR = "source"
2627

2728

2829
def _read_json_file(path):
@@ -64,8 +65,13 @@ def _determine_bazel_rule(api_path):
6465
try:
6566
query = f'filter("-py$", kind("rule", //{api_path}/...:*))'
6667
command = ["bazelisk", "query", query]
67-
result = subprocess.run(command, capture_output=True, text=True, check=True)
68-
68+
result = subprocess.run(
69+
command,
70+
cwd=f"{SOURCE_DIR}/googleapis",
71+
capture_output=True,
72+
text=True,
73+
check=True,
74+
)
6975
bazel_rule = result.stdout.strip()
7076
if not bazel_rule:
7177
raise ValueError(f"Bazel query `{query}` returned an empty bazel rule.")

0 commit comments

Comments
 (0)