File libxml2-python.spec of Package libxml2

# spec file for package libxml2-python (Version 2.7.3)
# Copyright (c) 2011 SUSE LINUX Products 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

# norootforbuild

Name:           libxml2-python
BuildRequires:  libxml2-devel python-devel
License:        MIT
Group:          Development/Libraries/Python
AutoReqProv:    on
Summary:        Python Bindings for libxml2
Version:        2.7.3
Release:        2.<RELEASE4>
Source:         libxml2-%{version}.tar.bz2
Source1:        libxml2-python-rpmlintrc
Requires:       libxml2 = %{version}
# Uncomment to save space:
#NoSource:      0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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.

    Daniel Veillard <>
    Bjorn Reese <>
    William Brack <>
    Igor Zlatkovic <>

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

# workaround for bnc#310196
%ifarch s390 s390x
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure \
    --with-fexceptions \
    --with-history \
# use libxml2 as built by libxml2 source package
mkdir .libs
cp -v %{_libdir}/ .
make -C python

make -C python install \
	pythondir=%{py_sitedir} \
# Unwanted doc stuff
rm -fr $RPM_BUILD_ROOT%{_datadir}/doc
rm -f python/tests/Makefile*
# #223696
rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}


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