From 7b74c5cdb4671324daeb786dcee1d40f3640fccb Mon Sep 17 00:00:00 2001 From: zhaorenhai Date: Sat, 27 Feb 2021 02:40:40 +0000 Subject: [PATCH] Add configure file wsgi-python3.conf --- mod_wsgi.spec | 9 ++++++++- wsgi-python3.conf | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 wsgi-python3.conf diff --git a/mod_wsgi.spec b/mod_wsgi.spec index 4a4fe71..dcc6f06 100644 --- a/mod_wsgi.spec +++ b/mod_wsgi.spec @@ -6,11 +6,12 @@ %global sphinxbin %{_bindir}/sphinx-build-3 Name: mod_wsgi Version: 4.6.4 -Release: 1 +Release: 2 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-python3.conf Patch1: mod_wsgi-4.5.20-exports.patch Patch2: Use-official-APIs-for-accessing-interpreter-list.patch Patch3: Changed-functions-to-pre-post-actions-when-forking.patch @@ -59,6 +60,8 @@ pushd py3build make install DESTDIR=$RPM_BUILD_ROOT LIBEXECDIR=%{_httpd_moddir} mv $RPM_BUILD_ROOT%{_httpd_moddir}/mod_wsgi{,_python3}.so install -d -m 755 $RPM_BUILD_ROOT%{_httpd_modconfdir} +install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-wsgi-python3.conf + %py3_install mv $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express{,-3} popd @@ -66,11 +69,15 @@ popd %files -n python3-%{name} %license LICENSE %doc CREDITS.rst README.rst +%config(noreplace) %{_httpd_modconfdir}/*wsgi-python3.conf %{_httpd_moddir}/mod_wsgi_python3.so %{python3_sitearch}/mod_wsgi-*.egg-info %{python3_sitearch}/mod_wsgi %{_bindir}/mod_wsgi-express-3 %changelog +* Sat Feb 27 2021 zhaorenhai - 4.6.4-2 +- Add configure file + * Thu Nov 19 2020 huanghaitao - 4.6.4-1 - package init diff --git a/wsgi-python3.conf b/wsgi-python3.conf new file mode 100644 index 0000000..fcf1d27 --- /dev/null +++ b/wsgi-python3.conf @@ -0,0 +1,7 @@ +# NOTE: mod_wsgi_python3 can not coexist in the same apache process as +# mod_wsgi (python2). Only load if mod_wsgi is not already loaded. + + + LoadModule wsgi_module modules/mod_wsgi_python3.so + + -- Gitee