Skip to content

Commit fd0bf69

Browse files
authored
Specify curl version when building confluent-kafka-python on Windows (#19361)
* Specify curl version when building confluent-kafka-python * get latest packages
1 parent fff0a19 commit fd0bf69

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.builders/images/windows-x86_64/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ RUN Get-RemoteFile `
116116

117117
ENV OPENSSL_VERSION="3.3.2"
118118

119+
ENV CURL_VERSION="8.11.1"
120+
119121
# Set up runner
120122
COPY runner_dependencies.txt C:\runner_dependencies.txt
121123
RUN python -m pip install --no-warn-script-location -r C:\runner_dependencies.txt

.builders/images/windows-x86_64/build_script.ps1

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,26 @@ Remove-Item "librdkafka-${kafka_version}.tar.gz"
2121
# Based on this job from upstream:
2222
# https://github.com/confluentinc/librdkafka/blob/cb8c19c43011b66c4b08b25e5150455a247e1ff3/.semaphore/semaphore.yml#L265
2323
# Install vcpkg
24-
Set-Location "C:\"
2524
$triplet = "x64-windows"
25+
$vcpkg_dir = "C:\vcpkg"
2626
$librdkafka_dir = "C:\librdkafka\librdkafka-${kafka_version}"
27+
$desired_tag = "2024.12.16"
28+
29+
# Clone and configure vcpkg
30+
if (-Not (Test-Path -Path "$vcpkg_dir\.git")) {
31+
git clone https://github.com/Microsoft/vcpkg.git $vcpkg_dir
32+
}
33+
34+
Set-Location $vcpkg_dir
35+
git checkout $desired_tag
36+
37+
Write-Host "Bootstrapping vcpkg..."
38+
.\bootstrap-vcpkg.bat
2739

28-
& "${librdkafka_dir}\win32\setup-vcpkg.ps1"
2940
# Get deps
3041
Set-Location "$librdkafka_dir"
31-
# Patch the the vcpkg manifest to to override the OpenSSL version
32-
python C:\update_librdkafka_manifest.py vcpkg.json --set-version openssl:${Env:OPENSSL_VERSION}
42+
# Patch the the vcpkg manifest to to override the OpenSSL version and CURL version
43+
python C:\update_librdkafka_manifest.py vcpkg.json --set-version openssl:${Env:OPENSSL_VERSION} --set-version curl:${Env:CURL_VERSION}
3344

3445
C:\vcpkg\vcpkg integrate install
3546
C:\vcpkg\vcpkg --feature-flags=versions install --triplet $triplet

0 commit comments

Comments
 (0)