added python-boost-py310 subpackage for python 3.10 support [release 1.81.0-2mamba;Thu Mar 30 2023]

This commit is contained in:
Silvan Calarco 2024-01-06 03:52:32 +01:00
parent 29435e0d6b
commit 598c65248d

View File

@ -2,7 +2,7 @@
%define pckmajver %(echo %version | cut -d. -f1-2 | tr . _) %define pckmajver %(echo %version | cut -d. -f1-2 | tr . _)
Name: libboost Name: libboost
Version: 1.81.0 Version: 1.81.0
Release: 1mamba Release: 2mamba
Summary: Free peer-reviewed portable C++ source libraries Summary: Free peer-reviewed portable C++ source libraries
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
@ -46,6 +46,7 @@ Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Provides: python-boost-devel Provides: python-boost-devel
Obsoletes: python-boost-devel < 1.78.0-2mamba Obsoletes: python-boost-devel < 1.78.0-2mamba
Requires: python-boost-py3 = %{?epoch:%epoch:}%{version}-%{release} Requires: python-boost-py3 = %{?epoch:%epoch:}%{version}-%{release}
Requires: python-boost-py310 = %{?epoch:%epoch:}%{version}-%{release}
%description devel %description devel
The Boost libraries provide free peer-reviewed portable C++ source libraries. The Boost libraries provide free peer-reviewed portable C++ source libraries.
@ -68,15 +69,26 @@ A further goal is to establish "existing practice" and provide reference impleme
Ten Boost libraries will be included in the C++ Standards Committee's upcoming C++ Standard Library Technical Report as a step toward becoming part of a future C++ Standard. Ten Boost libraries will be included in the C++ Standards Committee's upcoming C++ Standard Library Technical Report as a step toward becoming part of a future C++ Standard.
This package contains then Boost.python library for Python 3. This package contains then Boost.python library for Python 3.
%package -n python-boost-py310
Group: System/Libraries
Summary: Boost.Python library for Python 3.10
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n python-boost-py310
The Boost libraries provides free peer-reviewed portable C++ source libraries.
The emphasis is on libraries which work well with the C++ Standard Library.
The libraries are intended to be widely useful, and are in regular use by thousands of programmers across a broad spectrum of applications.
A further goal is to establish "existing practice" and provide reference implementations so that Boost libraries are suitable for eventual standardization.
Ten Boost libraries will be included in the C++ Standards Committee's upcoming C++ Standard Library Technical Report as a step toward becoming part of a future C++ Standard.
This package contains then Boost.python library for Python 3.10.
%debug_package %debug_package
%prep %prep
%setup -q -n boost_%{pckver} -a0 %setup -q -n boost_%{pckver} -a0
#-D -T #-D -T
#:<< _EOF #:<< _EOF
mv boost_%{pckver} boost_python mv boost_%{pckver} boost_python37
#cp -a boost_python boost_python36
#%patch0 -p1 #%patch0 -p1
#%patch1 -p1 #%patch1 -p1
@ -84,13 +96,13 @@ mv boost_%{pckver} boost_python
%build %build
#:<< _EOF #:<< _EOF
# Build boost with python3 # Build boost with python310
./bootstrap.sh \ ./bootstrap.sh \
--with-icu \ --with-icu \
--with-python-root=%{_prefix} \ --with-python-root=%{_prefix} \
--with-python-version=%{python3_version} --with-python-version=%{python310_version}
sed -i "s|using python.*|using python : %{python3_version} : %{_prefix} : %{python3_inc} ;|" project-config.jam sed -i "s|using python.*|using python : %{python310_version} : %{_prefix} : %{python310_inc} ;|" project-config.jam
echo "using mpi ;" >> project-config.jam echo "using mpi ;" >> project-config.jam
EXPAT_INCLUDE=%{_includedir} \ EXPAT_INCLUDE=%{_includedir} \
@ -98,7 +110,7 @@ EXPAT_LIBPATH=%{_libdir} \
./b2 \ ./b2 \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--layout=system -d2 \ --layout=system -d2 \
python=3.7 \ python=%{python310_version} \
runtime-link=shared \ runtime-link=shared \
link=shared,static \ link=shared,static \
toolset=gcc \ toolset=gcc \
@ -110,18 +122,17 @@ EXPAT_LIBPATH=%{_libdir} \
cflags="-fPIC" cflags="-fPIC"
%endif %endif
%ifarch disabled cd boost_python37
cd ../boost_python36 # Rebuild boost with Python 3.7
# Rebuild boost with Python 3.6
rm -f user-config.jam rm -f user-config.jam
./bootstrap.sh \ ./bootstrap.sh \
--with-icu \ --with-icu \
--with-python-root=%{_prefix} \ --with-python-root=%{_prefix} \
--with-python-version=%{python36_version} \ --with-python-version=%{python3_version} \
--with-libraries=python --with-libraries=python
sed -i "s|using python.*|using python : %{python36_version} : %{_prefix} : %{python36_inc} ;|" project-config.jam sed -i "s|using python.*|using python : %{python3_version} : %{_prefix} : %{python3_inc} ;|" project-config.jam
echo "using mpi ;" >> project-config.jam echo "using mpi ;" >> project-config.jam
EXPAT_INCLUDE=%{_includedir} \ EXPAT_INCLUDE=%{_includedir} \
@ -130,7 +141,7 @@ EXPAT_LIBPATH=%{_libdir} \
-a \ -a \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--layout=system -d2 \ --layout=system -d2 \
python=3.6 \ python=%{python3_version} \
runtime-link=shared \ runtime-link=shared \
link=shared,static \ link=shared,static \
toolset=gcc \ toolset=gcc \
@ -142,10 +153,9 @@ EXPAT_LIBPATH=%{_libdir} \
cflags="-fPIC" cflags="-fPIC"
%endif %endif
%endif
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
cd boost_python37
EXPAT_INCLUDE=%{_includedir} \ EXPAT_INCLUDE=%{_includedir} \
EXPAT_LIBPATH=%{_libdir} \ EXPAT_LIBPATH=%{_libdir} \
./b2 \ ./b2 \
@ -154,7 +164,26 @@ EXPAT_LIBPATH=%{_libdir} \
--execprefix=%{buildroot}%{_libexecdir} \ --execprefix=%{buildroot}%{_libexecdir} \
--includedir=%{buildroot}%{_includedir} \ --includedir=%{buildroot}%{_includedir} \
--layout=system -d2 \ --layout=system -d2 \
python=3.7 \ python=%{python3_version} \
runtime-link=shared \
link=shared,static \
toolset=gcc \
variant=release \
threading=multi \
debug-symbols=on \
install
cd ..
EXPAT_INCLUDE=%{_includedir} \
EXPAT_LIBPATH=%{_libdir} \
./b2 \
--prefix=%{buildroot}%{_prefix} \
--libdir=%{buildroot}%{_libdir} \
--execprefix=%{buildroot}%{_libexecdir} \
--includedir=%{buildroot}%{_includedir} \
--layout=system -d2 \
python=%{python310_version} \
runtime-link=shared \ runtime-link=shared \
link=shared,static \ link=shared,static \
toolset=gcc \ toolset=gcc \
@ -164,49 +193,11 @@ EXPAT_LIBPATH=%{_libdir} \
install install
# https://github.com/boostorg/python/issues/203#issuecomment-391477685 # https://github.com/boostorg/python/issues/203#issuecomment-391477685
for _lib in python numpy; do for _lib in python mpi_python numpy; do
ln -srL %{buildroot}%{_libdir}/libboost_${_lib}{27,}.so ln -srL %{buildroot}%{_libdir}/libboost_${_lib}{27,}.so
ln -srL %{buildroot}%{_libdir}/libboost_${_lib}3{7,}.so ln -srL %{buildroot}%{_libdir}/libboost_${_lib}3{10,}.so
done done
%ifarch disabled
cd boost_python
EXPAT_INCLUDE=%{_includedir} \
EXPAT_LIBPATH=%{_libdir} \
./b2 \
--prefix=%{buildroot}%{_prefix} \
--libdir=%{buildroot}%{_libdir} \
--execprefix=%{buildroot}%{_libexecdir} \
--includedir=%{buildroot}%{_includedir} \
--layout=system -d2 \
python=2.7 \
runtime-link=shared \
link=shared,static \
toolset=gcc \
variant=release \
threading=multi \
debug-symbols=on \
install
cd ../boost_python36
EXPAT_INCLUDE=%{_includedir} \
EXPAT_LIBPATH=%{_libdir} \
./b2 \
--prefix=%{buildroot}%{_prefix} \
--libdir=%{buildroot}%{_libdir} \
--execprefix=%{buildroot}%{_libexecdir} \
--includedir=%{buildroot}%{_includedir} \
--layout=system -d2 \
python=3.6 \
runtime-link=shared \
link=shared,static \
toolset=gcc \
variant=release \
threading=multi \
debug-symbols=on \
install
%endif
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -235,12 +226,22 @@ EXPAT_LIBPATH=%{_libdir} \
%files -n python-boost-py3 %files -n python-boost-py3
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/boost-python3*/mpi.so #%{_libdir}/boost-python3.7/mpi.so
%{_libdir}/libboost_python3*.so.* %{_libdir}/libboost_python37.so.*
%{_libdir}/libboost_mpi_python3*.so.* #%{_libdir}/libboost_mpi_python37.so.*
%{_libdir}/libboost_numpy3*.so.* %{_libdir}/libboost_numpy37.so.*
%files -n python-boost-py310
%defattr(-,root,root)
%{_libdir}/boost-python3.10/mpi.so
%{_libdir}/libboost_python310.so.*
%{_libdir}/libboost_mpi_python310.so.*
%{_libdir}/libboost_numpy310.so.*
%changelog %changelog
* Thu Mar 30 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 1.81.0-2mamba
- added python-boost-py310 subpackage for python 3.10 support
* Sat Dec 17 2022 Automatic Build System <autodist@mambasoft.it> 1.81.0-1mamba * Sat Dec 17 2022 Automatic Build System <autodist@mambasoft.it> 1.81.0-1mamba
- automatic version update by autodist - automatic version update by autodist