Added Python 3 subpackage
This commit is contained in:
parent
69a18109bc
commit
2b37fdf7bd
65
libxml2.spec
65
libxml2.spec
@ -1,12 +1,20 @@
|
||||
%global with_python3 1
|
||||
|
||||
Summary: Library providing XML and HTML support
|
||||
Name: libxml2
|
||||
Version: 2.9.2
|
||||
Release: 2%{?dist}%{?extra_release}
|
||||
Release: 3%{?dist}%{?extra_release}
|
||||
License: MIT
|
||||
Group: Development/Libraries
|
||||
Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
BuildRequires: python python-devel zlib-devel pkgconfig xz-devel
|
||||
BuildRequires: python-devel
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
%endif # with_python3
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: xz-devel
|
||||
URL: http://xmlsoft.org/
|
||||
Patch0: libxml2-multilib.patch
|
||||
Patch1: libxml2-2.9.0-do-not-check-crc.patch
|
||||
@ -58,8 +66,8 @@ Group: Development/Libraries
|
||||
Requires: libxml2 = %{version}-%{release}
|
||||
|
||||
%description python
|
||||
The libxml2-python package contains a module that permits applications
|
||||
written in the Python programming language to use the interface
|
||||
The libxml2-python package contains a Python 2 module that permits applications
|
||||
written in the Python programming language, version 2, to use the interface
|
||||
supplied by the libxml2 library to manipulate XML files.
|
||||
|
||||
This library allows to manipulate XML files. It includes support
|
||||
@ -67,6 +75,23 @@ to read, modify and write XML and HTML files. There is DTDs support
|
||||
this includes parsing and validation even with complex DTDs, either
|
||||
at parse time or later once the document has been modified.
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package python3
|
||||
Summary: Python 3 bindings for the libxml2 library
|
||||
Group: Development/Libraries
|
||||
Requires: libxml2 = %{version}-%{release}
|
||||
|
||||
%description python3
|
||||
The libxml2-python3 package contains a Python 3 module that permits
|
||||
applications written in the Python programming language, version 3, to use the
|
||||
interface supplied by the libxml2 library to manipulate XML files.
|
||||
|
||||
This library allows to manipulate XML files. It includes support
|
||||
to read, modify and write XML and HTML files. There is DTDs support
|
||||
this includes parsing and validation even with complex DTDs, either
|
||||
at parse time or later once the document has been modified.
|
||||
%endif # with_python3
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
@ -83,6 +108,12 @@ rm -fr %{buildroot}
|
||||
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
make clean
|
||||
%configure --with-python=%{__python3}
|
||||
make install DESTDIR=%{buildroot}
|
||||
%endif # with_python3
|
||||
|
||||
# multiarch crazyness on timestamp differences or Makefile/binaries for examples
|
||||
touch -m --reference=$RPM_BUILD_ROOT/%{_includedir}/libxml2/libxml/parser.h $RPM_BUILD_ROOT/%{_bindir}/xml2-config
|
||||
|
||||
@ -148,16 +179,36 @@ rm -fr %{buildroot}
|
||||
%files python
|
||||
%defattr(-, root, root)
|
||||
|
||||
%{_libdir}/python*/site-packages/libxml2.py*
|
||||
%{_libdir}/python*/site-packages/drv_libxml2.py*
|
||||
%{_libdir}/python*/site-packages/libxml2mod*
|
||||
%{_libdir}/python2*/site-packages/libxml2.py*
|
||||
%{_libdir}/python2*/site-packages/drv_libxml2.py*
|
||||
%{_libdir}/python2*/site-packages/libxml2mod*
|
||||
%doc python/TODO
|
||||
%doc python/libxml2class.txt
|
||||
%doc python/tests/*.py
|
||||
%doc doc/*.py
|
||||
%doc doc/python.html
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files python3
|
||||
%defattr(-, root, root)
|
||||
|
||||
%{_libdir}/python3*/site-packages/libxml2.py*
|
||||
%{_libdir}/python3*/site-packages/drv_libxml2.py*
|
||||
%{_libdir}/python3*/site-packages/__pycache__/libxml2.cpython-34.py*
|
||||
%{_libdir}/python3*/site-packages/__pycache__/drv_libxml2.cpython-34.py*
|
||||
%{_libdir}/python3*/site-packages/libxml2mod*
|
||||
%doc python/TODO
|
||||
%doc python/libxml2class.txt
|
||||
%doc python/tests/*.py
|
||||
%doc doc/*.py
|
||||
%doc doc/python.html
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 21 2015 Tomas Radej <tradej@redhat.com> - 2.9.2-3
|
||||
- Added Python 3 subpackage
|
||||
|
||||
* Thu Oct 16 2014 Lubomir Rintel <lkundrak@v3.sk> - 2.9.2-2
|
||||
- Avoid corrupting the xml catalogs
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user