python2 has gone

This commit is contained in:
Alexander Stefanov 2020-04-18 16:19:39 +00:00
parent 6471ea6f4b
commit b001039492

View file

@ -29,7 +29,7 @@ Version: 1.72.0
Release: 0.%{beta}.1 Release: 0.%{beta}.1
Source0: https://dl.bintray.com/boostorg/beta/%{version}.%(echo %{beta} |sed -e 's,^b,beta.,')/source/boost_%{packver}_%{beta}.tar.bz2 Source0: https://dl.bintray.com/boostorg/beta/%{version}.%(echo %{beta} |sed -e 's,^b,beta.,')/source/boost_%{packver}_%{beta}.tar.bz2
%else %else
Release: 4 Release: 5
Source0: https://dl.bintray.com/boostorg/release/%{version}/source/boost_%{packver}.tar.bz2 Source0: https://dl.bintray.com/boostorg/release/%{version}/source/boost_%{packver}.tar.bz2
%endif %endif
License: Boost License: Boost
@ -82,10 +82,8 @@ BuildRequires: xsltproc
BuildRequires: bzip2-devel BuildRequires: bzip2-devel
BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(icu-uc) >= 60.1 BuildRequires: pkgconfig(icu-uc) >= 60.1
BuildRequires: pkgconfig(python2)
BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(python3)
%if %{with numpy} %if %{with numpy}
BuildRequires: python2-numpy-devel
BuildRequires: python3-numpy-devel BuildRequires: python3-numpy-devel
%endif %endif
BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(zlib)
@ -264,42 +262,11 @@ done)}
EOF EOF
done)} done)}
%global libnamepython2 %mklibname boost_python27 %{version}
%global devnamepython2 %mklibname -d boost_python27
%global libnamepython3 %mklibname boost_python38 %{version} %global libnamepython3 %mklibname boost_python38 %{version}
%global devnamepython3 %mklibname -d boost_python38 %global devnamepython3 %mklibname -d boost_python38
%global oldlibnamepython3 %mklibname boost_python37 1.71.0 %global oldlibnamepython3 %mklibname boost_python37 1.71.0
%global olddevnamepython3 %mklibname -d boost_python37 %global olddevnamepython3 %mklibname -d boost_python37
%package -n %{libnamepython2}
Summary: Boost Python 2 shared library
Group: System/Libraries
Provides: boost-python2 = %{EVRD}
%description -n %{libnamepython2}
Boost Python 2 shared library
%files -n %{libnamepython2}
%{_libdir}/libboost_python27.so.%(echo %{version} |cut -d. -f1)*
%package -n %{devnamepython2}
Summary: Development files for the Boost Python 2 library
Group: Development/C++
# Headers are the same for python2 and python3, so we package
# them with what people SHOULD use
Requires: %{devnamepython3} = %{EVRD}
Requires: python2
Provides: boost-python27-devel = %{EVRD}
Provides: boost-python2-devel = %{EVRD}
Requires: %{coredevel} = %{EVRD}
Requires: %{libnamepython2} = %{EVRD}
%description -n %{devnamepython2}
Development files for the Boost Python 2 library
%files -n %{devnamepython2}
%{_libdir}/libboost_python27.so
%package -n %{libnamepython3} %package -n %{libnamepython3}
Summary: Boost Python 3 shared library Summary: Boost Python 3 shared library
Group: System/Libraries Group: System/Libraries
@ -334,41 +301,11 @@ Development files for the Boost Python 3 library
%{_libdir}/cmake/boost_python-%{version} %{_libdir}/cmake/boost_python-%{version}
%if %{with numpy} %if %{with numpy}
%global libnamenumpy2 %mklibname boost_numpy27 %{version}
%global devnamenumpy2 %mklibname -d boost_numpy27
%global libnamenumpy3 %mklibname boost_numpy38 %{version} %global libnamenumpy3 %mklibname boost_numpy38 %{version}
%global devnamenumpy3 %mklibname -d boost_numpy38 %global devnamenumpy3 %mklibname -d boost_numpy38
%global oldlibnamenumpy3 %mklibname boost_numpy37 1.71.0 %global oldlibnamenumpy3 %mklibname boost_numpy37 1.71.0
%global olddevnamenumpy3 %mklibname -d boost_numpy37 %global olddevnamenumpy3 %mklibname -d boost_numpy37
%package -n %{libnamenumpy2}
Summary: Boost NumPy 2 shared library
Group: System/Libraries
Provides: boost-numpy2 = %{EVRD}
%description -n %{libnamenumpy2}
Boost NumPy 2 shared library
%files -n %{libnamenumpy2}
%{_libdir}/libboost_numpy27.so.%(echo %{version} |cut -d. -f1)*
%package -n %{devnamenumpy2}
Summary: Development files for the Boost NumPy 2 library
Group: Development/C++
# Headers are the same for python2 and python3, so we package
# them with what people SHOULD use
Requires: %{devnamenumpy3} = %{EVRD}
Requires: python2
Provides: boost-numpy27-devel = %{EVRD}
Provides: boost-numpy2-devel = %{EVRD}
Requires: %{coredevel} = %{EVRD}
%description -n %{devnamenumpy2}
Development files for the Boost NumPy 2 library
%files -n %{devnamenumpy2}
%{_libdir}/libboost_numpy27.so
%package -n %{libnamenumpy3} %package -n %{libnamenumpy3}
Summary: Boost NumPy 3 shared library Summary: Boost NumPy 3 shared library
Group: System/Libraries Group: System/Libraries
@ -412,11 +349,6 @@ Summary: The libraries and headers needed for Boost development
Group: Development/C++ Group: Development/C++
Requires: %{expand:%(for lib in %boostbinlibs %develonly %develonly2; do echo -n "%%{devname${lib/-/_}} = %{version}-%{release} "; done)} Requires: %{expand:%(for lib in %boostbinlibs %develonly %develonly2; do echo -n "%%{devname${lib/-/_}} = %{version}-%{release} "; done)}
Requires: %{devnamepython3} = %{EVRD} Requires: %{devnamepython3} = %{EVRD}
# We could also require %{devnamepython2} = %{EVRD}, but let's not force
# people to install prehistoric crap that should have died a decade or two
# ago. If something really wants to use it, use a manual requirement on
# boost-python2-devel.
Conflicts: %{devnamepython2} < %{EVRD}
Requires: %{coredevel} = %{EVRD} Requires: %{coredevel} = %{EVRD}
Obsoletes: %{mklibname boost 1}-devel < %{EVRD} Obsoletes: %{mklibname boost 1}-devel < %{EVRD}
Provides: %{name}-devel = %{EVRD} Provides: %{name}-devel = %{EVRD}
@ -508,28 +440,8 @@ using $toolset : : : <compileflags>"%{optflags} -O3 -fno-strict-aliasing" <cxxfl
using python : %{py3_ver} : %{__python3} : %{py3_incdir} : %{_libdir} : : : ; using python : %{py3_ver} : %{__python3} : %{py3_incdir} : %{_libdir} : : : ;
EOF EOF
cat >python2-config.jam << EOF
using $toolset : : : <compileflags>"%{optflags} -O3 -fno-strict-aliasing" <cxxflags>"-std=c++14 -fPIC" <linkflags>"%{ldflags}" ;
using python : %{py2_ver} : %{__python2} : %{py2_incdir} : %{_libdir} : : : ;
EOF
./bootstrap.sh --with-toolset=$toolset --with-icu --prefix=%{_prefix} --libdir=%{_libdir} --with-python=%{__python3} ./bootstrap.sh --with-toolset=$toolset --with-icu --prefix=%{_prefix} --libdir=%{_libdir} --with-python=%{__python3}
# Build python2 bits first, so if there's any conflicts
# python3 will overwrite...
./b2 -d+2 -q %{?_smp_mflags} --without-mpi \
--user-config=./python2-config.jam --build-dir=py2 \
--prefix=%{_prefix} --libdir=%{_libdir} --layout=system \
-sHAVE_ICU=1 \
linkflags="%{ldflags} -lstdc++ -lm" \
%ifarch %ix86
instruction-set=i686 \
%endif
%ifarch znver1
instruction-set=znver1 \
%endif
threading=multi debug-symbols=on pch=off variant=release python=%{py2_ver}
# And python 3... # And python 3...
./b2 -d+2 -q %{?_smp_mflags} --without-mpi \ ./b2 -d+2 -q %{?_smp_mflags} --without-mpi \
--prefix=%{_prefix} --libdir=%{_libdir} --layout=system \ --prefix=%{_prefix} --libdir=%{_libdir} --layout=system \
@ -550,14 +462,6 @@ echo ============================= build Boost.Build ==================
./bootstrap.sh --with-toolset=$toolset) ./bootstrap.sh --with-toolset=$toolset)
%install %install
# Install python2 bits first, so if there's any conflicts
# python3 will overwrite...
./b2 -d+2 -q %{?_smp_mflags} --without-mpi \
--user-config=./python2-config.jam --build-dir=py2 \
--prefix=%{buildroot}%{_prefix} --libdir=%{buildroot}%{_libdir} \
debug-symbols=on pch=off python=%{py2_ver} \
install
# And python 3... # And python 3...
./b2 -d+2 -q %{?_smp_mflags} --without-mpi \ ./b2 -d+2 -q %{?_smp_mflags} --without-mpi \
--prefix=%{buildroot}%{_prefix} --libdir=%{buildroot}%{_libdir} \ --prefix=%{buildroot}%{_prefix} --libdir=%{buildroot}%{_libdir} \