A new user interface for you! Read more...

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 http://bugs.opensuse.org/
#

# 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
%py_requires
Requires:       libxml2 = %{version}
# Uncomment to save space:
#NoSource:      0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://xmlsoft.org

%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.



Authors:
--------
    Daniel Veillard <daniel@veillard.com>
    Bjorn Reese <breese@users.sourceforge.net>
    William Brack <wbrack@mmm.com.hk>
    Igor Zlatkovic <igor@stud.fh-frankfurt.de>

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

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

%install
make -C python install \
	DESTDIR=$RPM_BUILD_ROOT \
	pythondir=%{py_sitedir} \
	PYTHON_SITE_PACKAGES=%{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}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc python/TODO
%doc python/libxml2class.txt
%doc python/tests
%{py_sitedir}/*

%changelog