summaryrefslogtreecommitdiffstats
path: root/python/python-django-postorius.spec
blob: ee2e191231658966fe192a025e8edeff67a02458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# mailman3's TestableMaster can't be used outside of a
# source checkout?
%bcond_with tests

%global srcname postorius

Name:           python-django-%{srcname}
Version:        1.3.6
Release:        %autorelease
Summary:        Web UI for GNU Mailman
License:        GPLv3+
URL:            https://gitlab.com/mailman/postorius
Source0:        %{pypi_source %{srcname}}
# don't check out modules from git
Patch0:         %{srcname}-tox-localdeps.patch
# use PEP503 normalized dependencies
Patch1:         %{srcname}-pep503.patch

BuildArch:      noarch

BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools

%global _description %{expand:
The Postorius Django app provides a web user interface to access GNU Mailman.}

%description %{_description}


%package -n python%{python3_pkgversion}-django-%{srcname}
Summary:        %{summary}

%description -n python%{python3_pkgversion}-django-%{srcname} %{_description}


%prep
%autosetup -p1 -n %{srcname}-%{version}


%generate_buildrequires
%if %{with tests}
%pyproject_buildrequires -t
%else
%pyproject_buildrequires
%endif


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files %{srcname}


%if %{with tests}
%check
PYTHONPATH=$(pwd)/src:${PYTHONPATH} \
%tox
%endif


%files -n python%{python3_pkgversion}-django-%{srcname} -f %{pyproject_files}
%license COPYING
%doc README.rst


%changelog
%autochangelog