From 591d482b53a6ca975c3a1a17815f1d38bf022d0e9a2644a9102dec6d0101d86a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Sun, 13 Dec 2015 17:12:24 +0000 Subject: [PATCH] Accepting request 348685 from home:Dremor:branches:devel:libraries:c_c++ Adding Python3 support to Boost (boo#951902) . This should cause any compatibility issues, as the new library and the python2 library have different sonames. I've split python support into 2 package. The old one have the Python2 library, the new one have the Python3 one. OBS-URL: https://build.opensuse.org/request/show/348685 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/boost?expand=0&rev=156 --- boost.changes | 6 ++++++ boost.spec | 31 ++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/boost.changes b/boost.changes index 584d825..6ac4380 100644 --- a/boost.changes +++ b/boost.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Dec 13 15:31:10 UTC 2015 - egeorget@openmailbox.org + +- Add support to Boost:Python3 (boo#951902) + * New library: python3 + ------------------------------------------------------------------- Tue Dec 8 15:52:49 CET 2015 - pth@suse.de diff --git a/boost.spec b/boost.spec index 839126a..3f68522 100644 --- a/boost.spec +++ b/boost.spec @@ -94,6 +94,7 @@ BuildRequires: libbz2-devel BuildRequires: libexpat-devel BuildRequires: libicu-devel >= 4.4 BuildRequires: python-devel +BuildRequires: python3-devel #!BuildIgnore: python BuildRequires: zlib-devel Recommends: %{all_libs} @@ -311,6 +312,14 @@ Requires: boost-license%{lib_appendix} %description -n libboost_python%{lib_appendix} This package contains the Boost::Python Runtime libraries. +%package -n libboost_python3-%{lib_appendix} +Summary: Boost::Python Runtime Libraries +Group: System/Libraries +Requires: boost-license%{lib_appendix} + +%description -n libboost_python3-%{lib_appendix} +This package contains the Boost::Python3 Runtime libraries. + %package -n libboost_serialization%{lib_appendix} Summary: Boost::Serialization Runtime Libraries Group: System/Libraries @@ -458,6 +467,8 @@ export LONG_DOUBLE_FLAGS="--disable-long-double" %endif BJAM_CONFIG="-d2 -j$JOBS -sICU_PATH=%{_prefix}" PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]') +PYTHON3_VERSION=$(python3 -c 'import sys; print (sys.version[:3])') +PYTHON3_INCLUDE=m PYTHON_FLAGS="--with-python-root=%{_prefix} --with-python-version=$PYTHON_VERSION" export REGEX_FLAGS="--with-icu" export EXPAT_INCLUDE=%{_includedir} EXPAT_LIBPATH=%{_libdir} @@ -488,6 +499,16 @@ import os ; local RPM_OPT_FLAGS = [ os.environ RPM_OPT_FLAGS ] ; using gcc : : : \$(RPM_OPT_FLAGS) ; + +using python + : $PYTHON3_VERSION + : /usr/bin/python$PYTHON3_VERSION + : /usr/include/python$PYTHON3_VERSION$PYTHON3_INCLUDE + : /usr/lib/python$PYTHON3_VERSION + : + : + ; + EOF %if %{build_docs} @@ -611,6 +632,8 @@ install -m 0755 dist/bin/quickbook %{buildroot}%{_bindir}/quickbook %post -n libboost_python%{lib_appendix} -p /sbin/ldconfig +%post -n libboost_python3-%{lib_appendix} -p /sbin/ldconfig + %post -n libboost_regex%{lib_appendix} -p /sbin/ldconfig %post -n libboost_serialization%{lib_appendix} -p /sbin/ldconfig @@ -662,6 +685,8 @@ install -m 0755 dist/bin/quickbook %{buildroot}%{_bindir}/quickbook %postun -n libboost_python%{lib_appendix} -p /sbin/ldconfig +%postun -n libboost_python3-%{lib_appendix} -p /sbin/ldconfig + %postun -n libboost_regex%{lib_appendix} -p /sbin/ldconfig %postun -n libboost_serialization%{lib_appendix} -p /sbin/ldconfig @@ -759,7 +784,11 @@ install -m 0755 dist/bin/quickbook %{buildroot}%{_bindir}/quickbook %files -n libboost_python%{lib_appendix} %defattr(-, root, root, -) -%{_libdir}/libboost_python*.so.* +%{_libdir}/libboost_python.so.* + +%files -n libboost_python3-%{lib_appendix} +%defattr(-, root, root, -) +%{_libdir}/libboost_python3.so.* %files -n libboost_serialization%{lib_appendix} %defattr(-, root, root, -)