1
0

Accepting request 1154715 from devel:languages:python:mailman

OBS-URL: https://build.opensuse.org/request/show/1154715
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-postorius?expand=0&rev=7
This commit is contained in:
Ana Guerrero 2024-03-04 20:24:44 +00:00 committed by Git OBS Bridge
commit 21623dce1c
2 changed files with 30 additions and 19 deletions

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Mon Mar 4 09:51:32 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Provide postorius name and group in web package (rpm 4.19)
-------------------------------------------------------------------
Thu Feb 29 20:31:42 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Simplify python flavor selection
* Go back to primary python3 on Tumbleweed
* Use SLE15 python module pythons on 15.x
- Build PEP517 wheel
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Nov 6 11:47:26 UTC 2023 - Marcus Rueckert <mrueckert@suse.de> Mon Nov 6 11:47:26 UTC 2023 - Marcus Rueckert <mrueckert@suse.de>

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-postorius # spec file for package python-postorius
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -15,6 +15,7 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
%bcond_without testsuite %bcond_without testsuite
# keep in sync with setup.py # keep in sync with setup.py
@ -23,8 +24,6 @@
%global django_max_version 4.3 %global django_max_version 4.3
%global mailmanclient_min_version 3.3.3 %global mailmanclient_min_version 3.3.3
%{?sle15_python_module_pythons}
%global webapps_dir /srv/www/webapps %global webapps_dir /srv/www/webapps
%global postorius_pkgname postorius %global postorius_pkgname postorius
@ -39,19 +38,15 @@
%global postorius_datadir %{postorius_libdir}/data %global postorius_datadir %{postorius_libdir}/data
# keep in sync with python-HyperKitty/python-mailman-web # keep in sync with python-HyperKitty/python-mailman-web
# Always only build one flavor: primary python for TW, python311 from the SLE15 python module for 15.x
%if 0%{?suse_version} >= 1550 %if 0%{?suse_version} >= 1550
# Newest python supported by mailman is Python 3.11 %define pythons python3
%define pythons python311
%define mypython python311
%define __mypython %{__python311}
%define mypython_sitelib %{python311_sitelib}
%else %else
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
%define pythons python311
%define mypython python311
%define __mypython %{__python311}
%define mypython_sitelib %{python311_sitelib}
%endif %endif
%global mypython %pythons
%global mypython_sitelib %{expand:%%{%{mypython}_sitelib}}
%global __mypython %{expand:%%{__%{mypython}}}
Name: python-postorius Name: python-postorius
Version: 1.3.10 Version: 1.3.10
@ -70,8 +65,9 @@ Source20: README.SUSE.md
# #
Patch0: postorius-settings.patch Patch0: postorius-settings.patch
# #
BuildRequires: %{python_module devel} BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: acl BuildRequires: acl
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: openssl BuildRequires: openssl
@ -105,16 +101,16 @@ A web user interface for GNU Mailman
%package -n %{postorius_pkgname} %package -n %{postorius_pkgname}
Summary: A web user interface for GNU Mailman Summary: A web user interface for GNU Mailman
Requires: (%{mypython}-Django >= %{django_min_version} with %{mypython}-Django < %{django_max_version})
Requires: %{mypython}-django-debug-toolbar >= 2.2.0 Requires: %{mypython}-django-debug-toolbar >= 2.2.0
Requires: %{mypython}-django-mailman3 >= %{django_mailman3_min_version} Requires: %{mypython}-django-mailman3 >= %{django_mailman3_min_version}
Requires: %{mypython}-django-requests-debug-toolbar >= 0.0.3 Requires: %{mypython}-django-requests-debug-toolbar >= 0.0.3
Requires: %{mypython}-mailmanclient >= %{mailmanclient_min_version} Requires: %{mypython}-mailmanclient >= %{mailmanclient_min_version}
Requires: %{mypython}-readme_renderer Requires: %{mypython}-readme_renderer
%if "%{expand:%%%{mypython}_provides}" == "python3" Requires: (%{mypython}-Django >= %{django_min_version} with %{mypython}-Django < %{django_max_version})
Provides: python3-%{postorius_pkgname} = %{version}-%{release} # help in replacing any previously installed flavor package back to the unprefixed package
%endif %if 0%{?suse_version} < 1550
Obsoletes: python3-%{postorius_pkgname} < %{version}-%{release} Obsoletes: python3-%{postorius_pkgname} < %{version}-%{release}
%endif
Provides: %{mypython}-%{postorius_pkgname} = %{version}-%{release} Provides: %{mypython}-%{postorius_pkgname} = %{version}-%{release}
Obsoletes: %{mypython}-%{postorius_pkgname} < %{version}-%{release} Obsoletes: %{mypython}-%{postorius_pkgname} < %{version}-%{release}
@ -127,6 +123,8 @@ Requires: %{postorius_pkgname}
Requires: acl Requires: acl
Requires: openssl Requires: openssl
Requires: sudo Requires: sudo
Provides: user(postorius)
Provides: group(postorius)
%description -n %{postorius_pkgname}-web %description -n %{postorius_pkgname}-web
A web user interface for GNU Mailman. A web user interface for GNU Mailman.
@ -163,7 +161,7 @@ sed -i 's|^#!/usr/bin/env.*|#!%{__mypython}|' \
sed -i 's|/usr/bin/python3|%{__mypython}|' %{SOURCE10} sed -i 's|/usr/bin/python3|%{__mypython}|' %{SOURCE10}
sed -i 's|python3|%{mypython}|' %{SOURCE12} sed -i 's|python3|%{mypython}|' %{SOURCE12}
%python_build %pyproject_wheel
# Build static files # Build static files
install -d -m 0755 build_static_files/logs install -d -m 0755 build_static_files/logs
@ -171,7 +169,7 @@ export PYTHONPATH=$(pwd)/src
%python_exec build_static_files/manage.py collectstatic --clear --noinput %python_exec build_static_files/manage.py collectstatic --clear --noinput
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
install -d -m 0750 \ install -d -m 0750 \