Drop python2 for Fedora 32+ (bz#1773125)

This commit is contained in:
Orion Poplawski 2019-11-15 17:11:04 -07:00
parent 554b26025b
commit 03674c8f8f
1 changed files with 21 additions and 3 deletions

View File

@ -19,6 +19,12 @@
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
%if 0%{?fedora} >= 32
%bcond_with python2
%else
%bcond_without python2
%endif
%ifarch aarch64 ppc64le x86_64
%bcond_without ucx
%else
@ -27,7 +33,7 @@
Name: openmpi%{?_cc_name_suffix}
Version: 4.0.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Open Message Passing Interface
License: BSD and MIT and Romio
URL: http://www.open-mpi.org/
@ -67,8 +73,6 @@ BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(Getopt::Long)
BuildRequires: pmix-devel
BuildRequires: python2
BuildRequires: python2-devel
BuildRequires: python%{python3_pkgversion}-devel
%ifarch x86_64
BuildRequires: infinipath-psm-devel
@ -144,13 +148,16 @@ Contains development wrapper for compiling Java with openmpi.
# particular package, version, compiler
%global namearch openmpi-%{_arch}%{?_cc_name_suffix}
%if %{with python2}
%package -n python2-openmpi
Summary: OpenMPI support for Python 2
BuildRequires: python2-devel
Requires: %{name} = %{version}-%{release}
Requires: python(abi) = %{python2_version}
%description -n python2-openmpi
OpenMPI support for Python 2.
%endif
%package -n python%{python3_pkgversion}-openmpi
Summary: OpenMPI support for Python 3
@ -208,7 +215,11 @@ sed 's#@LIBDIR@#%{_libdir}/%{name}#;
s#@FMODDIR@#%{_fmoddir}/%{name}#;
s#@INCDIR@#%{_includedir}/%{namearch}#;
s#@MANDIR@#%{_mandir}/%{namearch}#;
%if %{with python2}
s#@PY2SITEARCH@#%{python2_sitearch}/%{name}#;
%else
/@PY2SITEARCH@/d;
%endif
s#@PY3SITEARCH@#%{python3_sitearch}/%{name}#;
s#@COMPILER@#openmpi-%{_arch}%{?_cc_name_suffix}#;
s#@SUFFIX@#%{?_cc_name_suffix}_openmpi#' \
@ -237,8 +248,10 @@ sed -i -e s/-ldl// -e s/-lhwloc// \
%{buildroot}%{_libdir}/%{name}/share/openmpi/*-wrapper-data.txt
# install .pth files
%if %{with python2}
mkdir -p %{buildroot}/%{python2_sitearch}/%{name}
install -pDm0644 %{SOURCE2} %{buildroot}/%{python2_sitearch}/openmpi.pth
%endif
mkdir -p %{buildroot}/%{python3_sitearch}/%{name}
install -pDm0644 %{SOURCE3} %{buildroot}/%{python3_sitearch}/openmpi.pth
@ -331,9 +344,11 @@ make check
%{_libdir}/%{name}/share/doc/
%{_mandir}/%{namearch}/man1/mpijavac.1.gz
%if %{with python2}
%files -n python2-openmpi
%dir %{python2_sitearch}/%{name}
%{python2_sitearch}/openmpi.pth
%endif
%files -n python%{python3_pkgversion}-openmpi
%dir %{python3_sitearch}/%{name}
@ -341,6 +356,9 @@ make check
%changelog
* Fri Nov 15 2019 Orion Poplawski <orion@nwra.com> - 4.0.2-2
- Drop python2 for Fedora 32+ (bz#1773125)
* Mon Oct 7 2019 Philip Kovacs <pkfed@fedoraproject.org> - 4.0.2-1
- Update to 4.0.2