File python-libxml2.spec of Package libxml2.1804

# spec file for package python-libxml2
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           python-libxml2
Version:        2.9.1
Release:        0
Summary:        Python Bindings for libxml2
License:        MIT
Group:          Development/Libraries/Python
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  libxml2-devel
BuildRequires:  python-devel
#!BuildIgnore:  python
BuildRequires:  python-xml
Requires:       libxml2-2 = %{version}
# Uncomment to save space:
#NoSource:      0
Obsoletes:      libxml2-python < %{version}
Provides:       libxml2-python = %{version}

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.

%setup -q -n libxml2-%{version}

# workaround for bnc#310196
%ifarch s390 s390x
export CFLAGS="%{optflags} -fno-strict-aliasing"
%configure \
    --with-fexceptions \
    --with-history \
    --enable-ipv6 \
    --with-sax1 \
    --with-regexps \
    --with-threads \
    --with-reader \

# use libxml2 as built by libxml2 source package
mkdir .libs
cp -v %{_libdir}/ .
make -C python %{?_smp_mflags}

make -C python install \
    DESTDIR=%{buildroot} \
    pythondir=%{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}

%defattr(-, root, root)
%doc python/TODO
%doc python/libxml2class.txt
%doc python/tests

openSUSE Build Service is sponsored by