Rebases 0.40.0

epel9
Hirotaka Wakabayashi 2 months ago
parent f080ec4ff1
commit 055360c5f9

@ -1,56 +1,40 @@
diff -ruN qpid-proton-0.38.0.orig/CMakeLists.txt qpid-proton-0.38.0/CMakeLists.txt diff -rc qpid-proton-0.40.0.orig/CMakeLists.txt qpid-proton-0.40.0/CMakeLists.txt
--- qpid-proton-0.38.0.orig/CMakeLists.txt 2022-11-07 11:35:09.000000000 -0500 *** qpid-proton-0.40.0.orig/CMakeLists.txt Fri Nov 29 12:08:10 2024
+++ qpid-proton-0.38.0/CMakeLists.txt 2022-11-23 10:19:17.963751717 -0500 --- qpid-proton-0.40.0/CMakeLists.txt Fri Nov 29 12:08:31 2024
@@ -42,7 +42,7 @@ ***************
if (NOT DEFINED Python_FIND_FRAMEWORK) *** 42,48 ****
set(Python_FIND_FRAMEWORK "LAST") if (NOT DEFINED Python_FIND_FRAMEWORK)
endif () set(Python_FIND_FRAMEWORK "LAST")
-find_package(Python 3.6 endif ()
+find_package(Python 3.9 ! find_package(Python 3.9
REQUIRED COMPONENTS Interpreter REQUIRED COMPONENTS Interpreter
OPTIONAL_COMPONENTS Development) OPTIONAL_COMPONENTS Development)
diff -ruN qpid-proton-0.38.0.orig/cpp/src/map_test.cpp qpid-proton-0.38.0/cpp/src/map_test.cpp --- 42,48 ----
--- qpid-proton-0.38.0.orig/cpp/src/map_test.cpp 2022-11-07 11:35:09.000000000 -0500 if (NOT DEFINED Python_FIND_FRAMEWORK)
+++ qpid-proton-0.38.0/cpp/src/map_test.cpp 2023-01-26 10:49:44.159634165 -0500 set(Python_FIND_FRAMEWORK "LAST")
@@ -114,6 +114,20 @@ endif ()
ASSERT_THROWS(conversion_error, m.value(bad)); ! find_package(Python 3.13
} REQUIRED COMPONENTS Interpreter
OPTIONAL_COMPONENTS Development)
+void test_copy_constructor() {
+ proton::map<string, scalar> m = std::map<string, scalar>{{"a", 2}, {"b", 3}}; diff -rc qpid-proton-0.40.0.orig/python/CMakeLists.txt qpid-proton-0.40.0/python/CMakeLists.txt
+ ASSERT_EQUAL(scalar(2), m.get("a")); *** qpid-proton-0.40.0.orig/python/CMakeLists.txt Fri Nov 29 12:08:10 2024
+ ASSERT_EQUAL(scalar(3), m.get("b")); --- qpid-proton-0.40.0/python/CMakeLists.txt Fri Nov 29 12:09:04 2024
+ ASSERT_EQUAL(2U, m.size()); ***************
+} *** 74,80 ****
+ COMMAND ${PN_ENV_SCRIPT} --
+void test_initializer_list_constructor() { PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_SOURCE_DIR}
+ proton::map<string, scalar> m({{"a", 2}, {"b", 3}}); LD_LIBRARY_PATH="${CMAKE_CURRENT_BINARY_DIR}/c"
+ ASSERT_EQUAL(scalar(2), m.get("a")); ! ${Python_EXECUTABLE} -m sphinx "${CMAKE_CURRENT_SOURCE_DIR}/docs" "${CMAKE_CURRENT_BINARY_DIR}/docs")
+ ASSERT_EQUAL(scalar(3), m.get("b")); add_dependencies(docs docs-py)
+ ASSERT_EQUAL(2U, m.size()); install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/docs/"
+} DESTINATION "${PROTON_SHARE}/docs/api-py"
+ --- 74,80 ----
} COMMAND ${PN_ENV_SCRIPT} --
PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_SOURCE_DIR}
int main(int, char**) { LD_LIBRARY_PATH="${CMAKE_CURRENT_BINARY_DIR}/c"
@@ -122,5 +136,7 @@ ! sphinx-build "${CMAKE_CURRENT_SOURCE_DIR}/docs" "${CMAKE_CURRENT_BINARY_DIR}/docs")
RUN_TEST(failed, test_use()); add_dependencies(docs docs-py)
RUN_TEST(failed, test_cppmap()); install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/docs/"
RUN_TEST(failed, test_value()); DESTINATION "${PROTON_SHARE}/docs/api-py"
+ RUN_TEST(failed, test_copy_constructor());
+ RUN_TEST(failed, test_initializer_list_constructor());
return failed;
}
diff -ruN qpid-proton-0.38.0.orig/python/CMakeLists.txt qpid-proton-0.38.0/python/CMakeLists.txt
--- qpid-proton-0.38.0.orig/python/CMakeLists.txt 2022-11-07 11:35:09.000000000 -0500
+++ qpid-proton-0.38.0/python/CMakeLists.txt 2022-11-23 10:20:07.216991810 -0500
@@ -101,7 +101,7 @@
COMMAND ${PN_ENV_SCRIPT} --
PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_SOURCE_DIR}
LD_LIBRARY_PATH="${CMAKE_CURRENT_BINARY_DIR}/c"
- ${Python_EXECUTABLE} -m sphinx "${CMAKE_CURRENT_SOURCE_DIR}/docs" "${CMAKE_CURRENT_BINARY_DIR}/docs")
+ sphinx-build "${CMAKE_CURRENT_SOURCE_DIR}/docs" "${CMAKE_CURRENT_BINARY_DIR}/docs")
add_dependencies(docs docs-py)
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/docs/"
DESTINATION "${PROTON_SHARE}/docs/api-py"

@ -7,8 +7,8 @@
%undefine __brp_mangle_shebangs %undefine __brp_mangle_shebangs
Name: qpid-proton Name: qpid-proton
Version: 0.38.0 Version: 0.40.0
Release: 10%{?dist} Release: 1%{?dist}
Summary: A high performance, lightweight messaging library Summary: A high performance, lightweight messaging library
# Automatically converted from old format: ASL 2.0 - review is highly recommended. # Automatically converted from old format: ASL 2.0 - review is highly recommended.
License: Apache-2.0 License: Apache-2.0
@ -16,7 +16,6 @@ URL: http://qpid.apache.org/proton/
Source0: %{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz
Patch0: proton.patch Patch0: proton.patch
Source1: licenses.xml Source1: licenses.xml
%global proton_licensedir %{_licensedir}/proton %global proton_licensedir %{_licensedir}/proton
@ -25,24 +24,21 @@ Source1: licenses.xml
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: cmake BuildRequires: cmake
BuildRequires: swig
BuildRequires: pkgconfig
BuildRequires: doxygen
BuildRequires: libuuid-devel BuildRequires: libuuid-devel
BuildRequires: openssl-devel BuildRequires: openssl-devel
BuildRequires: cyrus-sasl-devel
BuildRequires: cyrus-sasl-plain
BuildRequires: cyrus-sasl-md5
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-pip BuildRequires: python3-build
BuildRequires: python3-rpm-macros BuildRequires: python3-cffi
BuildRequires: python3-setuptools
BuildRequires: python3-sphinx BuildRequires: python3-sphinx
BuildRequires: python3-wheel BuildRequires: python3-wheel
BuildRequires: glibc-headers BuildRequires: pkgconfig
BuildRequires: cyrus-sasl-devel
BuildRequires: jsoncpp-devel
BuildRequires: python3-setuptools
BuildRequires: libuv-devel
BuildRequires: nspr-devel
#BuildRequires: opentelemetry-cpp-devel
%description %description
Proton is a high performance, lightweight messaging library. It can be used in Proton is a high performance, lightweight messaging library. It can be used in
@ -165,7 +161,6 @@ Obsoletes: qpid-proton-cpp-devel-docs
%doc %{proton_datadir}/examples/cpp/README.dox %doc %{proton_datadir}/examples/cpp/README.dox
%doc %{proton_datadir}/examples/cpp/CMakeLists.txt %doc %{proton_datadir}/examples/cpp/CMakeLists.txt
%doc %{proton_datadir}/examples/cpp/ssl-certs %doc %{proton_datadir}/examples/cpp/ssl-certs
%doc %{proton_datadir}/examples/cpp/tracing.dox
%doc %{proton_datadir}/examples/cpp/tutorial.dox %doc %{proton_datadir}/examples/cpp/tutorial.dox
@ -214,7 +209,6 @@ BuildArch: noarch
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version}
%patch -p1 0 %patch -p1 0
%build %build
mkdir -p BLD mkdir -p BLD
cd BLD cd BLD
@ -236,16 +230,13 @@ cd BLD
# Need to remove anything built by the python cmake build in proton # Need to remove anything built by the python cmake build in proton
# so that we rebuild from scratch # so that we rebuild from scratch
rm -rf build rm -rf build
# Need to do the python package build here as we rely on the qpid-proton-core
# library to be installed so we don't duplicate it inside the extension
# That is also why we have to point pkg-config at the installed library
PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig %py3_build_wheel
%global whl_tags cp%{python3_version_nodots}-cp%{python3_version_nodots}-%(echo %{python3_platform} | tr -- - _) %global whl_tags cp%{python3_version_nodots}-cp%{python3_version_nodots}-%(echo %{python3_platform} | tr -- - _)
cd ..
%py3_install_wheel python_qpid_proton-%{version}-%{whl_tags}.whl %py3_install_wheel python_qpid_proton-%{version}-%{whl_tags}.whl
# We seem to need to strip the build extension otherwise it seems to embed a reference to # We seem to need to strip the build extension otherwise it seems to embed a reference to
# the buildroot in the debug info which fails the rpmbuild - probably because we massaged # the buildroot in the debug info which fails the rpmbuild - probably because we massaged
# the pkgconfig path above # the pkgconfig path above
strip %{buildroot}%{python3_sitearch}/_cproton*.so) strip %{buildroot}%{python3_sitearch}/cproton*.so)
install -dm 755 %{buildroot}%{proton_licensedir} install -dm 755 %{buildroot}%{proton_licensedir}
install -pm 644 %{SOURCE1} %{buildroot}%{proton_licensedir} install -pm 644 %{SOURCE1} %{buildroot}%{proton_licensedir}
@ -314,6 +305,9 @@ rm -f %{buildroot}%{proton_datadir}/CMakeLists.txt
%check %check
%changelog %changelog
* Fri Nov 29 2024 Hirotaka Wakabayashi <hiwkby@yahoo.com> - 0.40.0-1
- Rebased to 0.40.0
* Wed Jul 24 2024 Miroslav Suchý <msuchy@redhat.com> - 0.38.0-10 * Wed Jul 24 2024 Miroslav Suchý <msuchy@redhat.com> - 0.38.0-10
- convert license to SPDX - convert license to SPDX

Loading…
Cancel
Save