forked from pool/python-postorius
Accepting request 986687 from home:bnavigator:branches:devel:languages:python:mailman
- Use Python 3.9 like the rest of mailman3 OBS-URL: https://build.opensuse.org/request/show/986687 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:mailman/python-postorius?expand=0&rev=37
This commit is contained in:
parent
1fc2ca935a
commit
af430641fe
@ -1,3 +1,5 @@
|
|||||||
addFilter("zero-length")
|
addFilter("zero-length")
|
||||||
addFilter("non-standard-gid")
|
addFilter("non-standard-gid")
|
||||||
addFilter("non-standard-uid")
|
addFilter("non-standard-uid")
|
||||||
|
addFilter("spurious-executable-perm .*example_project/wsgi.py")
|
||||||
|
addFilter("obsolete-not-provided python3-postorius")
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 4 15:18:15 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Use Python 3.9 like the rest of mailman3
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jun 9 17:23:56 UTC 2022 - Andreas Schneider <asn@cryptomilk.org>
|
Thu Jun 9 17:23:56 UTC 2022 - Andreas Schneider <asn@cryptomilk.org>
|
||||||
|
|
||||||
|
@ -29,9 +29,20 @@
|
|||||||
%global postorius_logdir %{_localstatedir}/log/postorius
|
%global postorius_logdir %{_localstatedir}/log/postorius
|
||||||
%global postorius_datadir %{postorius_libdir}/data
|
%global postorius_datadir %{postorius_libdir}/data
|
||||||
|
|
||||||
|
%if 0%{?suse_version} >= 1550
|
||||||
|
# Newest python supported by mailman is Python 3.9 -- https://gitlab.com/mailman/mailman/-/issues/936
|
||||||
|
%define pythons python39
|
||||||
|
%define mypython python39
|
||||||
|
%define __mypython %{__python39}
|
||||||
|
%define mypython_sitelib %{python39_sitelib}
|
||||||
|
%else
|
||||||
%{?!python_module:%define python_module() python3-%{**}}
|
%{?!python_module:%define python_module() python3-%{**}}
|
||||||
# mailman is built only for primary python3 flavor
|
|
||||||
%define pythons python3
|
%define pythons python3
|
||||||
|
%define mypython python3
|
||||||
|
%define __mypython %{__python3}
|
||||||
|
%define mypython_sitelib %{python3_sitelib}
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: python-postorius
|
Name: python-postorius
|
||||||
Version: 1.3.6
|
Version: 1.3.6
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -60,11 +71,11 @@ BuildRequires: openssl
|
|||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: rsync
|
BuildRequires: rsync
|
||||||
BuildRequires: sudo
|
BuildRequires: sudo
|
||||||
Requires: python-Django >= 1.11
|
|
||||||
Requires: python-django-mailman3 >= 1.3.7
|
|
||||||
Requires: python-mailmanclient >= 3.3.2
|
|
||||||
Requires: python-readme_renderer
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%if 0%{?suse_version} >= 1550
|
||||||
|
# use the real python3 primary for rpm pythondistdeps.py
|
||||||
|
BuildRequires: python3-packaging
|
||||||
|
%endif
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: mailman3 >= 3.3.5
|
BuildRequires: mailman3 >= 3.3.5
|
||||||
BuildRequires: %{python_module Django >= 2.2}
|
BuildRequires: %{python_module Django >= 2.2}
|
||||||
@ -78,21 +89,32 @@ BuildRequires: %{python_module pytest}
|
|||||||
BuildRequires: %{python_module readme_renderer}
|
BuildRequires: %{python_module readme_renderer}
|
||||||
BuildRequires: %{python_module vcrpy}
|
BuildRequires: %{python_module vcrpy}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%if 0%{python3_version_nodots} == 38
|
|
||||||
# help in replacing any previously installed multiflavor package back to the primary python3 package
|
|
||||||
Provides: python38-postorius = %{version}-%{release}
|
|
||||||
Obsoletes: python38-postorius < %{version}-%{release}
|
|
||||||
%endif
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A web user interface for GNU Mailman
|
A web user interface for GNU Mailman
|
||||||
|
|
||||||
|
%package -n %{postorius_pkgname}
|
||||||
|
Summary: A web user interface for GNU Mailman
|
||||||
|
Requires: %{mypython}-Django >= 1.11
|
||||||
|
Requires: %{mypython}-django-mailman3 >= 1.3.7
|
||||||
|
Requires: %{mypython}-mailmanclient >= 3.3.2
|
||||||
|
Requires: %{mypython}-readme_renderer
|
||||||
|
%if "%{expand:%%%{mypython}_provides}" == "python3"
|
||||||
|
Provides: python3-%{postorius_pkgname} = %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
Obsoletes: python3-%{postorius_pkgname} < %{version}-%{release}
|
||||||
|
Provides: %{mypython}-%{postorius_pkgname} = %{version}-%{release}
|
||||||
|
Obsoletes: %{mypython}-%{postorius_pkgname} < %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n %{postorius_pkgname}
|
||||||
|
A web user interface for GNU Mailman
|
||||||
|
|
||||||
%package -n %{postorius_pkgname}-web
|
%package -n %{postorius_pkgname}-web
|
||||||
Summary: The webroot for GNU Mailman
|
Summary: The webroot for GNU Mailman
|
||||||
Requires: acl
|
Requires: acl
|
||||||
Requires: openssl
|
Requires: openssl
|
||||||
Requires: python3-postorius
|
Requires: %{postorius_pkgname}
|
||||||
Requires: sudo
|
Requires: sudo
|
||||||
|
|
||||||
%description -n %{postorius_pkgname}-web
|
%description -n %{postorius_pkgname}-web
|
||||||
@ -103,7 +125,7 @@ This package holds the web interface.
|
|||||||
%package -n %{postorius_pkgname}-web-uwsgi
|
%package -n %{postorius_pkgname}-web-uwsgi
|
||||||
Summary: Postorius - uwsgi configuration
|
Summary: Postorius - uwsgi configuration
|
||||||
Requires: %{postorius_pkgname}-web
|
Requires: %{postorius_pkgname}-web
|
||||||
Requires: uwsgi
|
Requires: %{mypython}-uwsgi-python3
|
||||||
|
|
||||||
%description -n %{postorius_pkgname}-web-uwsgi
|
%description -n %{postorius_pkgname}-web-uwsgi
|
||||||
A web user interface for GNU Mailman.
|
A web user interface for GNU Mailman.
|
||||||
@ -121,8 +143,10 @@ rsync -a example_project/* build_static_files
|
|||||||
%autopatch -p1
|
%autopatch -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
sed -i 's|^#!/usr/bin/env.*|#!%{_bindir}/python3|' \
|
sed -i 's|^#!/usr/bin/env.*|#!%{__mypython}|' \
|
||||||
example_project/manage.py
|
example_project/manage.py
|
||||||
|
sed -i 's|/usr/bin/python3|%{__mypython}|' %{SOURCE10}
|
||||||
|
sed -i 's|python3|%{mypython}|' %{SOURCE12}
|
||||||
|
|
||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
@ -175,6 +199,9 @@ pushd example_project
|
|||||||
export PYTHONPATH='../src'
|
export PYTHONPATH='../src'
|
||||||
export LANG=C.UTF-8
|
export LANG=C.UTF-8
|
||||||
%pytest ..
|
%pytest ..
|
||||||
|
# clean flavored alternatives created by test setup, because we are going to install the example_project as docs
|
||||||
|
rm -rf build/flavorbin
|
||||||
|
rm -rf build/xdgflavorconfig
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%pre -n %{postorius_pkgname}-web
|
%pre -n %{postorius_pkgname}-web
|
||||||
@ -188,10 +215,11 @@ if ! grep -q "^SECRET_KEY.*" %{postorius_etcdir}/settings_local.py; then
|
|||||||
fi
|
fi
|
||||||
%{_sbindir}/postorius-manage migrate --pythonpath /srv/www/webapps/mailman/postorius/ --settings settings
|
%{_sbindir}/postorius-manage migrate --pythonpath /srv/www/webapps/mailman/postorius/ --settings settings
|
||||||
|
|
||||||
%files %{python_files}
|
%files -n %{postorius_pkgname}
|
||||||
%doc README.rst example_project
|
%doc README.rst example_project
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{python_sitelib}/*
|
%{mypython_sitelib}/postorius
|
||||||
|
%{mypython_sitelib}/postorius-%{version}*-info
|
||||||
|
|
||||||
%files -n %{postorius_pkgname}-web
|
%files -n %{postorius_pkgname}-web
|
||||||
%doc README.SUSE.md
|
%doc README.SUSE.md
|
||||||
|
Loading…
x
Reference in New Issue
Block a user