%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} %{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}} %{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} # /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4 %{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} %{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}} Name: python3-mod_wsgi Version: 4.7.1 Release: 1%{?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}/mod_wsgi-%{version}.tar.gz Source1: wsgi-python3.conf Patch0: mod_wsgi-4.5.20-exports.patch BuildRequires: httpd-devel BuildRequires: gcc BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python36-sphinx BuildRequires: python36-sphinx_rtd_theme Requires: httpd-mmn = %{_httpd_mmn} %description The mod_wsgi adapter is an Apache module that provides a WSGI compliant interface for hosting Python based web applications within Apache. The adapter is written completely in C code against the Apache C runtime and for hosting WSGI applications within Apache has a lower overhead than using existing WSGI adapters for mod_python or CGI. %prep %autosetup -n mod_wsgi-%{version} -p 1 %build make -C docs html SPHINXBUILD=%{_bindir}/sphinx-build-%{python3_version} export LDFLAGS="$RPM_LD_FLAGS -L%{_libdir}" export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=python3 %make_build %py3_build %install %make_install LIBEXECDIR=%{_httpd_moddir} mv %{buildroot}%{_httpd_moddir}/mod_wsgi{,_python3}.so install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_httpd_modconfdir}/10-wsgi-python3.conf %py3_install mv %{buildroot}%{_bindir}/mod_wsgi-express{,-3} %files %license LICENSE %doc CREDITS.rst README.rst %config(noreplace) %{_httpd_modconfdir}/10-wsgi-python3.conf %{_httpd_moddir}/mod_wsgi_python3.so %{python3_sitearch}/mod_wsgi %{python3_sitearch}/mod_wsgi-%{version}-py%{python3_version}.egg-info %{_bindir}/mod_wsgi-express-3 %changelog * Sat Sep 26 2020 Carl George - 4.7.1-1 - Initial EPEL 7 package, based on Fedora mod_wsgi package