Accepting request 890325 from home:bnavigator:branches:devel:languages:python:mailman

- Restrict build to primary python3 in order to avoid conflicting
  packages.

OBS-URL: https://build.opensuse.org/request/show/890325
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:mailman/python-mailman?expand=0&rev=46
This commit is contained in:
Matej Cepl 2021-05-04 18:34:22 +00:00 committed by Git OBS Bridge
parent 12db2a15e0
commit dc30e9b524
2 changed files with 16 additions and 18 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue May 4 09:23:40 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Restrict build to primary python3 in order to avoid conflicting
packages.
-------------------------------------------------------------------
Mon Mar 22 08:09:48 UTC 2021 - Michael Ströder <michael@stroeder.com>

View File

@ -34,11 +34,8 @@
%define psuffix %{nil}
%bcond_with test
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%if 0%{?suse_version} >= 1550
%define skip_python36 1
%endif
%{?!python_module:%define python_module() python3-%{**}}
%define pythons python3
Name: python-mailman%{psuffix}
Version: 3.3.4
Release: 0
@ -114,7 +111,6 @@ BuildRequires: %{python_module importlib_resources >= 1.1.0}
BuildRequires: %{python_module lazr.config}
BuildRequires: %{python_module mailman >= %{version}}
BuildRequires: %{python_module nose2}
# BuildRequires: %{python_module nose}
BuildRequires: %{python_module passlib}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dateutil >= 2.0}
@ -124,6 +120,11 @@ BuildRequires: %{python_module zope.configuration}
BuildRequires: %{python_module zope.event}
BuildRequires: %{python_module zope.interface >= 5.0}
%endif
%if 0%{python3_version_nodots} == 38
# help in replacing any previously installed multiflavor package back to the primary python3 package
Provides: python38-mailman = %{version}-%{release}
Obsoletes: python38-mailman < %{version}-%{release}
%endif
%python_subpackages
%description
@ -154,9 +155,6 @@ sed '/importlib_resources/d' -i src/mailman.egg-info/requires.txt setup.py
%install
%if !%{with test}
%python_install
%python_clone -a %{buildroot}%{_bindir}/master
%python_clone -a %{buildroot}%{_bindir}/mailman
%python_clone -a %{buildroot}%{_bindir}/runner
%python_expand %fdupes %{buildroot}%{$python_sitelib}
install -d -m 0755 \
@ -225,9 +223,6 @@ getent passwd %{mailman_user} >/dev/null || \
%service_add_pre %{mailman_services}
%post
%python_install_alternative master
%python_install_alternative mailman
%python_install_alternative runner
%tmpfiles_create %{_tmpfilesdir}/%{mailman_name}.conf
%service_add_post %{mailman_services}
@ -236,18 +231,15 @@ getent passwd %{mailman_user} >/dev/null || \
%postun
%service_del_postun %{mailman_services}
%python_uninstall_alternative master
%python_uninstall_alternative mailman
%python_uninstall_alternative runner
%files %{python_files}
%doc README.rst README.SUSE.md
%license COPYING
%{_sbindir}/rc%{mailman_name}*
%python_alternative %{_bindir}/runner
%python_alternative %{_bindir}/mailman
%python_alternative %{_bindir}/master
%{_bindir}/runner
%{_bindir}/mailman
%{_bindir}/master
%{python_sitelib}/*
%{_unitdir}/%{mailman_name}.service