[packages/python-libxml2] - last version of libxml2 supporting python2.7, build limited to python module

qboosh qboosh at pld-linux.org
Sat Nov 15 18:04:45 CET 2025


commit dd8f5421289a8635037761fcaf4c65341aed6239
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Nov 15 18:04:31 2025 +0100

    - last version of libxml2 supporting python2.7, build limited to python module

 libxml2-largefile.patch | 12 +++++++
 python-libxml2.spec     | 87 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 99 insertions(+)
---
diff --git a/python-libxml2.spec b/python-libxml2.spec
new file mode 100644
index 0000000..1fd28df
--- /dev/null
+++ b/python-libxml2.spec
@@ -0,0 +1,87 @@
+#
+# Conditional build:
+%bcond_without	apidocs		# API documentation
+%bcond_with	ftp		# FTP support
+%bcond_without	legacy		# legacy API support
+%bcond_without	zlib		# zlib support
+
+Summary:	libxml2 module for Python 2.x
+Summary(pl.UTF-8):	Moduł libxml2 dla Pythona 2.x
+Name:		python-libxml2
+# keep 2.14.x here for python2 support
+Version:	2.14.6
+Release:	1
+Epoch:		1
+License:	MIT
+Group:		Libraries/Python
+#Source0:	ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
+Source0:	https://download.gnome.org/sources/libxml2/2.14/libxml2-%{version}.tar.xz
+# Source0-md5:	a2bb2b6cb8fc7be1fafa14f500e4f7c5
+Patch0:		libxml2-largefile.patch
+URL:		http://xmlsoft.org/
+BuildRequires:	autoconf >= 2.68
+BuildRequires:	automake >= 1:1.16.3
+BuildRequires:	libtool >= 2:2.0
+BuildRequires:	pkgconfig
+BuildRequires:	python-devel >= 1:2.7
+BuildRequires:	python-modules >= 1:2.7
+BuildRequires:	python-setuptools
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+BuildRequires:	tar >= 1:1.22
+BuildRequires:	xz
+BuildRequires:	xz-devel
+%{?with_zlib:BuildRequires:	zlib-devel >= 1.2.3.3}
+Requires:	libxml2%{?_isa} >= 1:2.14.6
+Requires:	python-libs >= 1:2.7
+Obsoletes:	libxml2-python < 1:2.6
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This is the libxml2 module for Python 2.x, providing access to the
+libxml2 library.
+
+%description -l pl.UTF-8
+Ten pakiet zawiera moduł libxml2 dla Pythona 2.x, zapewniający dostęp
+do biblioteki libxml2.
+
+%prep
+%setup -q -n libxml2-%{version}
+%patch -P0 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+	--disable-silent-rules \
+	%{?with_ftp:--with-ftp} \
+	--with-http \
+	%{?with_legacy:--with-legacy} \
+	--with-lzma \
+	--without-python \
+	--with-tls \
+	%{?with_zlib:--with-zlib}
+
+cd python
+%py_build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+cd python
+%py_install
+
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/libxml2mod.so
+%{py_sitedir}/drv_libxml2.py[co]
+%{py_sitedir}/libxml2.py[co]
+%{py_sitedir}/libxml2_python-%{version}-py*.egg-info
diff --git a/libxml2-largefile.patch b/libxml2-largefile.patch
new file mode 100644
index 0000000..79d1c67
--- /dev/null
+++ b/libxml2-largefile.patch
@@ -0,0 +1,12 @@
+--- libxml2-2.11.0/libxml.h.orig	2023-04-29 12:27:04.077844048 +0200
++++ libxml2-2.11.0/libxml.h	2023-04-29 12:28:21.828831198 +0200
+@@ -17,6 +17,9 @@
+   #ifndef _LARGEFILE_SOURCE
+     #define _LARGEFILE_SOURCE
+   #endif
++  #ifndef _LARGEFILE64_SOURCE
++    #define _LARGEFILE64_SOURCE
++  #endif
+   #ifndef _FILE_OFFSET_BITS
+     #define _FILE_OFFSET_BITS 64
+   #endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-libxml2.git/commitdiff/dd8f5421289a8635037761fcaf4c65341aed6239



More information about the pld-cvs-commit mailing list