Skip to content

Commit

Permalink
Merge pull request #352 from Point72/tkp/gssapi
Browse files Browse the repository at this point in the history
Build librdkafka with gssapi support for pip package, fixes #325
  • Loading branch information
alexddobkin authored Feb 13, 2025
2 parents ae63c74 + 60bacf2 commit 1c2fe0a
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ endif
.PHONY: dependencies-mac dependencies-debian dependencies-fedora dependencies-vcpkg dependencies-win

dependencies-mac: ## install dependencies for mac
HOMEBREW_NO_AUTO_UPDATE=1 brew install bison cmake flex make ninja
HOMEBREW_NO_AUTO_UPDATE=1 brew install autoconf autoconf-archive automake bison cmake flex libtool make ninja pkg-config
brew unlink bison flex && brew link --force bison flex

dependencies-debian: ## install dependencies for linux
apt-get install -y automake bison cmake curl flex ninja-build tar unzip zip
apt-get install -y autoconf autoconf-archive automake bison cmake curl flex libtool ninja-build pkg-config tar unzip zip

dependencies-fedora: ## install dependencies for linux
yum install -y automake bison ccache cmake curl flex perl-IPC-Cmd tar unzip zip
yum install -y autoconf autoconf-archive automake bison ccache cmake curl flex libtool perl-IPC-Cmd pkg-config tar unzip zip

dependencies-vcpkg: ## install dependencies via vcpkg
cd vcpkg && ./bootstrap-vcpkg.sh && ./vcpkg install
Expand Down
5 changes: 5 additions & 0 deletions cpp/cmake/modules/FindDepsKafkaAdapter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ cmake_minimum_required(VERSION 3.7.2)

if (CSP_USE_VCPKG)
find_package(RdKafka CONFIG REQUIRED)
if(NOT WIN32)
# Bad, but a temporary workaround for
# https://github.com/microsoft/vcpkg/issues/40320
link_directories(${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib)
endif()
else()
find_package(RdKafka REQUIRED)
endif()
2 changes: 1 addition & 1 deletion cpp/csp/adapters/kafka/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set_target_properties(csp_kafka_adapter PROPERTIES PUBLIC_HEADER "${KAFKA_HEADER

find_package(DepsKafkaAdapter REQUIRED)

target_link_libraries(csp_kafka_adapter PRIVATE csp_adapter_utils RdKafka::rdkafka RdKafka::rdkafka++)
target_link_libraries(csp_kafka_adapter PUBLIC csp_adapter_utils RdKafka::rdkafka RdKafka::rdkafka++)

install(TARGETS csp_kafka_adapter
PUBLIC_HEADER DESTINATION include/csp/adapters/kafka
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,18 @@ rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux &&
dnf config-manager --set-enabled powertools &&
dnf install epel-release -y &&
make dependencies-fedora
export ACLOCAL_PATH="/usr/share/aclocal:$(printenv ACLOCAL_PATH)"
"""
environment = {CSP_MANYLINUX="ON"}
repair-wheel-command = "auditwheel -v show {wheel} && LD_LIBRARY_PATH=/project/csp/lib auditwheel -v repair -w {dest_dir} {wheel}"
skip = "*i686 musllinux*"
manylinux-x86_64-image = "manylinux_2_28"

[tool.cibuildwheel.macos]
before-all ="make dependencies-mac"
before-all ="""
make dependencies-mac
export ACLOCAL_PATH="$(brew --prefix autoconf-archive)/share/aclocal:$(printenv ACLOCAL_PATH)"
"""
archs = "x86_64" # NOTE: we use gcc and we cannot cross compile for now

[tool.cibuildwheel.windows]
Expand Down
2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 715 files
18 changes: 17 additions & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,30 @@
"boost-beast",
"boost-multi-index",
"brotli",
{
"name": "cyrus-sasl",
"platform": "!windows"
},
"exprtk",
"gtest",
{
"name": "krb5",
"platform": "!windows"
},
{
"name": "librdkafka",
"features": [
{
"name": "sasl",
"platform": "!windows"
},
"ssl"
]
},
{
"name": "lmdb",
"platform": "!windows"
},
"lz4",
"openssl",
"parquet",
Expand All @@ -30,5 +46,5 @@
"port-version" : 1
}
],
"builtin-baseline": "1b5f7346612cd63910567df714d867f5b3fa8e3b"
"builtin-baseline": "6af584dd59aa5bdba75dae6781ec74614e03e5b9"
}

0 comments on commit 1c2fe0a

Please sign in to comment.