Bump to 2.12.5 accepted/tizen_base accepted/tizen_base_asan accepted/tizen_base_toolchain accepted/tizen_base_x accepted/tizen_base_x_asan sandbox/jinwang.an/python-libxml2-2.12.5_20230213 tizen_base accepted/tizen/base/20240328.043321 accepted/tizen/base/asan/20240406.082518 accepted/tizen/base/toolchain/20240424.234717 accepted/tizen/base/x/20240328.090319 accepted/tizen/base/x/asan/20240412.003154
authorTizenOpenSource <tizenopensrc@samsung.com>
Tue, 13 Feb 2024 07:17:04 +0000 (16:17 +0900)
committerTizenOpenSource <tizenopensrc@samsung.com>
Tue, 13 Feb 2024 07:17:04 +0000 (16:17 +0900)
Signed-off-by: TizenOpenSource <tizenopensrc@samsung.com>
packaging/python-libxml2.manifest [new file with mode: 0644]
packaging/python-libxml2.spec [new file with mode: 0644]

diff --git a/packaging/python-libxml2.manifest b/packaging/python-libxml2.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/python-libxml2.spec b/packaging/python-libxml2.spec
new file mode 100644 (file)
index 0000000..3b480e8
--- /dev/null
@@ -0,0 +1,68 @@
+Name:           python-libxml2
+Version:        2.12.5
+Release:        0
+Summary:        Python Bindings for libxml2
+License:        MIT
+Group:          Development/Python
+Url:            http://xmlsoft.org
+Source:         %{name}-%{version}.tar.gz
+Source1001:     %{name}.manifest
+
+BuildRequires:  libxml2-devel
+BuildRequires:  python-devel
+BuildRequires:  python-xml
+
+Requires:       libxml2 = %{version}
+Obsoletes:      libxml2-python < %{version}
+Provides:       libxml2-python = %{version}
+
+%description
+The libxml2-python package contains a module that permits applications
+written in the Python programming language to use the interface
+supplied by the libxml2 library to manipulate XML files.
+
+This library allows manipulation of XML files. It includes support for
+reading, modifying, and writing XML and HTML files. There is DTD
+support that includes parsing and validation even with complex DTDs,
+either at parse time or later once the document has been modified.
+
+%prep
+%setup -q -n %{name}-%{version}
+cp %{SOURCE1001} .
+
+%build
+export CFLAGS="%{optflags} -fno-strict-aliasing"
+%autogen
+%configure \
+    --with-fexceptions \
+    --with-history \
+    --enable-ipv6 \
+    --with-sax1 \
+    --with-regexps \
+    --with-threads \
+    --with-reader \
+    --with-http
+
+# use libxml2 as built by libxml2 source package
+mkdir .libs
+cp -v %{_libdir}/libxml2.la .
+make -C python %{?_smp_mflags}
+
+%install
+make -C python install \
+    DESTDIR=%{buildroot} \
+    pythondir=%{py_sitedir} \
+    PYTHON_SITE_PACKAGES=%{py_sitedir}
+chmod a-x python/tests/*.py
+# Unwanted doc stuff
+rm -fr %{buildroot}%{_datadir}/doc
+rm -f python/tests/Makefile*
+# #223696
+rm -f %{buildroot}%{py_sitedir}/*.{la,a}
+
+%files
+%manifest %{name}.manifest
+%license Copyright
+%doc python/libxml2class.txt
+%doc python/tests
+%{py_sitedir}/*