- only build docs with Python 3
- fix build on Fedora>30 and RHEL 7
This commit is contained in:
parent
4378a2b90f
commit
353c6f85a8
@ -8,10 +8,8 @@
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%global with_python3 1
|
||||
%global sphinxbin %{_bindir}/sphinx-build-3
|
||||
%else
|
||||
%global with_python3 0
|
||||
%global sphinxbin %{_bindir}/sphinx-build
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} <= 7
|
||||
@ -23,14 +21,14 @@
|
||||
|
||||
Name: mod_wsgi
|
||||
Version: 4.6.4
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: A WSGI interface for Python web applications in Apache
|
||||
License: ASL 2.0
|
||||
URL: https://modwsgi.readthedocs.io/
|
||||
Source0: https://github.com/GrahamDumpleton/mod_wsgi/archive/%{version}.tar.gz#/mod_wsgi-%{version}.tar.gz
|
||||
Source1: wsgi.conf
|
||||
Source2: wsgi-python3.conf
|
||||
Patch1: mod_wsgi-4.5.20-exports.patch
|
||||
Patch1: mod_wsgi-4.5.20-exports.patch
|
||||
|
||||
BuildRequires: httpd-devel
|
||||
BuildRequires: gcc
|
||||
@ -39,8 +37,6 @@ BuildRequires: gcc
|
||||
%{?filter_provides_in: %filter_provides_in %{_httpd_moddir}/.*\.so$}
|
||||
%{?filter_setup}
|
||||
|
||||
|
||||
|
||||
%global _description\
|
||||
The mod_wsgi adapter is an Apache module that provides a WSGI compliant\
|
||||
interface for hosting Python based web applications within Apache. The\
|
||||
@ -55,7 +51,7 @@ existing WSGI adapters for mod_python or CGI.\
|
||||
%package -n python2-%{name}
|
||||
Summary: %summary
|
||||
Requires: httpd-mmn = %{_httpd_mmn}
|
||||
BuildRequires: python2-devel, python2-sphinx
|
||||
BuildRequires: python2-devel, python2-setuptools
|
||||
%{?python_provide:%python_provide python2-%{name}}
|
||||
# Remove before F30
|
||||
Provides: mod_wsgi = %{version}-%{release}
|
||||
@ -70,7 +66,7 @@ Obsoletes: mod_wsgi < %{version}-%{release}
|
||||
%package -n python3-%{name}
|
||||
Summary: %summary
|
||||
Requires: httpd-mmn = %{_httpd_mmn}
|
||||
BuildRequires: python3-devel, python3-sphinx
|
||||
BuildRequires: python3-devel, python3-sphinx, python3-sphinx_rtd_theme
|
||||
%if 0%{?with_python2} == 0
|
||||
Provides: mod_wsgi = %{version}-%{release}
|
||||
Provides: mod_wsgi%{?_isa} = %{version}-%{release}
|
||||
@ -85,8 +81,12 @@ Obsoletes: mod_wsgi < %{version}-%{release}
|
||||
%setup -qn %{name}-%{version}
|
||||
%patch1 -p1 -b .exports
|
||||
|
||||
: Python2=%{with_python2} Python3=%{with_python3}
|
||||
|
||||
%build
|
||||
make -C docs html SPHINXBUILD=%{sphinxbin}
|
||||
%if %{with_python3}
|
||||
make -C docs html SPHINXBUILD=%{_bindir}/sphinx-build-3
|
||||
%endif
|
||||
|
||||
export LDFLAGS="$RPM_LD_FLAGS -L%{_libdir}"
|
||||
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
@ -163,6 +163,10 @@ ln -s %{_bindir}/mod_wsgi-express-2 $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Apr 16 2019 Joe Orton <jorton@redhat.com> - 4.6.4-4
|
||||
- only build docs with Python 3
|
||||
- fix build on Fedora>30 and RHEL 7
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.4-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user