Accepting request 1226585 from home:fmccarthy:branches:devel:languages:python

Updated to address pytest excluded tests specification feedback and
fix build issues identified by test runs when building for multiple
Python versions.

OBS-URL: https://build.opensuse.org/request/show/1226585
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pulsar-client?expand=0&rev=1
This commit is contained in:
2024-11-26 16:53:53 +00:00
committed by Git OBS Bridge
commit cb50cc1655
9 changed files with 361 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
diff -pru pulsar-client-python-3.5.0.orig/CMakeLists.txt pulsar-client-python-3.5.0.new/CMakeLists.txt
--- pulsar-client-python-3.5.0.orig/CMakeLists.txt 2024-04-02 02:38:10.000000000 -0400
+++ pulsar-client-python-3.5.0.new/CMakeLists.txt 2024-11-19 08:07:09.147620062 -0500
@@ -51,7 +51,11 @@ message(STATUS "PULSAR_INCLUDE: ${PULSAR
SET(CMAKE_CXX_STANDARD 11)
-find_package (Python3 REQUIRED COMPONENTS Development.Module)
+if (DEFINED USE_PYTHON_VERSION)
+ set(PYTHON_VERSION_REQUIREMENT ${USE_PYTHON_VERSION} EXACT)
+ message(STATUS "Using Python version: " ${USE_PYTHON_VERSION})
+endif()
+find_package (Python3 ${PYTHON_VERSION_REQUIREMENT} REQUIRED COMPONENTS Development.Module)
MESSAGE(STATUS "PYTHON: " ${Python3_VERSION} " - " ${Python3_INCLUDE_DIRS})
find_path(PYBIND11_INCLUDE_DIRS NAMES "pybind11/pybind11.h")
@@ -81,6 +85,9 @@ set(PYTHON_WRAPPER_LIBS
${PULSAR_LIBRARY}
)
set(PYTHON_WRAPPER_LIBS ${PYTHON_WRAPPER_LIBS} Python3::Module)
+if (DEFINED USE_PYTHON_VERSION)
+ set(PYTHON_WRAPPER_LIBS ${PYTHON_WRAPPER_LIBS} ${LIB_INSTALL_DIR}/libpython${USE_PYTHON_VERSION}.so)
+endif()
message(STATUS "All libraries: ${PYTHON_WRAPPER_LIBS}")