Avoid python3 module / package depending on python2 (#1609491)
This commit is contained in:
parent
e7833de5f4
commit
b4adaae81f
@ -23,7 +23,7 @@
|
||||
|
||||
Name: mod_wsgi
|
||||
Version: 4.6.4
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: A WSGI interface for Python web applications in Apache
|
||||
Group: System Environment/Libraries
|
||||
License: ASL 2.0
|
||||
@ -92,22 +92,28 @@ make -C docs html SPHINXBUILD=%{sphinxbin}
|
||||
export LDFLAGS="$RPM_LD_FLAGS -L%{_libdir}"
|
||||
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
|
||||
%if 0%{?with_python3} > 0
|
||||
mkdir py3build/
|
||||
# this always produces an error (because of trying to copy py3build
|
||||
# into itself) but we don't mind, so || :
|
||||
cp -R * py3build/ || :
|
||||
pushd py3build
|
||||
%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=python3
|
||||
make %{?_smp_mflags}
|
||||
%py3_build
|
||||
popd
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python2} > 0
|
||||
%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=python2
|
||||
make %{?_smp_mflags}
|
||||
%py2_build
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3} > 0
|
||||
%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=python3
|
||||
make %{?_smp_mflags}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
# first install python3 variant and rename the so file
|
||||
%if 0%{?with_python3} > 0
|
||||
|
||||
pushd py3build
|
||||
make install DESTDIR=$RPM_BUILD_ROOT LIBEXECDIR=%{_httpd_moddir}
|
||||
mv $RPM_BUILD_ROOT%{_httpd_moddir}/mod_wsgi{,_python3}.so
|
||||
|
||||
@ -117,6 +123,7 @@ install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-wsgi-python3
|
||||
|
||||
%py3_install
|
||||
mv $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express{,-3}
|
||||
popd
|
||||
|
||||
%endif
|
||||
|
||||
@ -157,6 +164,10 @@ ln -s %{_bindir}/mod_wsgi-express-2 $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jul 31 2018 Adam Williamson <awilliam@redhat.com> - 4.6.4-2
|
||||
- Run Python 3 build in a subdir, so module isn't linked against both
|
||||
libpython 2 and libpython 3 (rhbz#1609491)
|
||||
|
||||
* Fri Jul 20 2018 Matthias Runge <mrunge@redhat.com> - 4.6.4-1
|
||||
- update to 4.6.4 (rhbz#1560329)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user