Only build python support on Fedora

Resolves: RHEL-53012
This commit is contained in:
Tomas Popela 2024-08-06 14:07:41 +02:00
parent 14bef90b89
commit 8462cd67e4

View File

@ -1,7 +1,7 @@
Name: libxslt Name: libxslt
Summary: Library providing the Gnome XSLT engine Summary: Library providing the Gnome XSLT engine
Version: 1.1.39 Version: 1.1.39
Release: 4%{?dist} Release: 5%{?dist}
License: MIT License: MIT
URL: https://gitlab.gnome.org/GNOME/libxslt URL: https://gitlab.gnome.org/GNOME/libxslt
@ -15,6 +15,7 @@ BuildRequires: libtool
BuildRequires: make BuildRequires: make
BuildRequires: gcc BuildRequires: gcc
BuildRequires: pkgconfig(libxml-2.0) >= 2.6.27 BuildRequires: pkgconfig(libxml-2.0) >= 2.6.27
BuildRequires: python3-devel
# Fedora specific patches # Fedora specific patches
Patch0: multilib.patch Patch0: multilib.patch
@ -36,14 +37,13 @@ Requires: libgpg-error-devel%{?_isa}
The %{name}-devel package contains libraries and header files for The %{name}-devel package contains libraries and header files for
developing applications that use %{name}. developing applications that use %{name}.
%if 1 %if 0%{?fedora}
# Upstream package has not been ported to Python 3. I have # Upstream package has not been ported to Python 3. I have
# converted this section so it could be used to compile the # converted this section so it could be used to compile the
# Python 3 bindings one day once that has happened, but # Python 3 bindings one day once that has happened, but
# commented it out. - RWMJ 2019-09-10 # commented it out. - RWMJ 2019-09-10
%package -n python3-libxslt %package -n python3-libxslt
Summary: Python 3 bindings for %{name} Summary: Python 3 bindings for %{name}
BuildRequires: python3-devel
BuildRequires: python3-libxml2 BuildRequires: python3-libxml2
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python3-libxml2 Requires: python3-libxml2
@ -68,7 +68,15 @@ chmod 644 python/tests/*
autoreconf -vfi autoreconf -vfi
#export PYTHON=%{__python3} #export PYTHON=%{__python3}
#%configure --disable-static --disable-silent-rules --with-python #%configure --disable-static --disable-silent-rules --with-python
%configure --disable-static --disable-silent-rules --with-python=yes --with-crypto=no %configure \
--disable-static \
--disable-silent-rules \
%if 0%{?fedora}
--with-python=yes \
%else
--with-python=no \
%endif
--with-crypto=no
%make_build %make_build
%install %install
@ -114,7 +122,7 @@ rm -vrf %{buildroot}%{_docdir}
%{_libdir}/pkgconfig/libexslt.pc %{_libdir}/pkgconfig/libexslt.pc
%{_bindir}/xslt-config %{_bindir}/xslt-config
%if 1 %if 0%{?fedora}
%files -n python3-libxslt %files -n python3-libxslt
%{python3_sitelib}/libxslt.py* %{python3_sitelib}/libxslt.py*
%{python3_sitearch}/libxsltmod.so %{python3_sitearch}/libxsltmod.so
@ -126,6 +134,9 @@ rm -vrf %{buildroot}%{_docdir}
%endif %endif
%changelog %changelog
* Tue Aug 06 2024 Tomas Popela <tpopela@redhat.com> - 1.1.39-5
- Only build python support on Fedora
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.1.39-4 * Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.1.39-4
- Bump release for June 2024 mass rebuild - Bump release for June 2024 mass rebuild