Skip to content

Commit

Permalink
Specify curl version when building confluent-kafka-python on Windows (#…
Browse files Browse the repository at this point in the history
…19361)

* Specify curl version when building confluent-kafka-python

* get latest packages
  • Loading branch information
Kyle-Neale authored Jan 10, 2025
1 parent fff0a19 commit fd0bf69
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .builders/images/windows-x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ RUN Get-RemoteFile `

ENV OPENSSL_VERSION="3.3.2"

ENV CURL_VERSION="8.11.1"

# Set up runner
COPY runner_dependencies.txt C:\runner_dependencies.txt
RUN python -m pip install --no-warn-script-location -r C:\runner_dependencies.txt
Expand Down
19 changes: 15 additions & 4 deletions .builders/images/windows-x86_64/build_script.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,26 @@ Remove-Item "librdkafka-${kafka_version}.tar.gz"
# Based on this job from upstream:
# https://github.com/confluentinc/librdkafka/blob/cb8c19c43011b66c4b08b25e5150455a247e1ff3/.semaphore/semaphore.yml#L265
# Install vcpkg
Set-Location "C:\"
$triplet = "x64-windows"
$vcpkg_dir = "C:\vcpkg"
$librdkafka_dir = "C:\librdkafka\librdkafka-${kafka_version}"
$desired_tag = "2024.12.16"

# Clone and configure vcpkg
if (-Not (Test-Path -Path "$vcpkg_dir\.git")) {
git clone https://github.com/Microsoft/vcpkg.git $vcpkg_dir
}

Set-Location $vcpkg_dir
git checkout $desired_tag

Write-Host "Bootstrapping vcpkg..."
.\bootstrap-vcpkg.bat

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

C:\vcpkg\vcpkg integrate install
C:\vcpkg\vcpkg --feature-flags=versions install --triplet $triplet
Expand Down

0 comments on commit fd0bf69

Please sign in to comment.