Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
GNOME
libxml2
Commits
fb8e9e21
Commit
fb8e9e21
authored
Feb 18, 2015
by
Tomas Radej
Committed by
Daniel Veillard
Feb 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Python 3 rpm subpackage
Allow compilation and packaging of both python2 and python3 when present
parent
32119739
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
6 deletions
+54
-6
libxml.spec.in
libxml.spec.in
+54
-6
No files found.
libxml.spec.in
View file @
fb8e9e21
%global with_python3 1
Summary: Library providing XML and HTML support
Summary: Library providing XML and HTML support
Name: libxml2
Name: libxml2
Version: @VERSION@
Version: @VERSION@
...
@@ -6,7 +8,13 @@ License: MIT
...
@@ -6,7 +8,13 @@ License: MIT
Group: Development/Libraries
Group: Development/Libraries
Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
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/
URL: http://xmlsoft.org/
%description
%description
...
@@ -55,8 +63,8 @@ Group: Development/Libraries
...
@@ -55,8 +63,8 @@ Group: Development/Libraries
Requires: libxml2 = %{version}-%{release}
Requires: libxml2 = %{version}-%{release}
%description python
%description python
The libxml2-python package contains a module that permits applications
The libxml2-python package contains a
Python 2
module that permits applications
written in the Python programming language to use the interface
written in the Python programming language
, version 2,
to use the interface
supplied by the libxml2 library to manipulate XML files.
supplied by the libxml2 library to manipulate XML files.
This library allows to manipulate XML files. It includes support
This library allows to manipulate XML files. It includes support
...
@@ -64,6 +72,23 @@ to read, modify and write XML and HTML files. There is DTDs support
...
@@ -64,6 +72,23 @@ to read, modify and write XML and HTML files. There is DTDs support
this includes parsing and validation even with complex DTDs, either
this includes parsing and validation even with complex DTDs, either
at parse time or later once the document has been modified.
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
%prep
%setup -q
%setup -q
...
@@ -76,6 +101,13 @@ rm -fr %{buildroot}
...
@@ -76,6 +101,13 @@ rm -fr %{buildroot}
make install DESTDIR=%{buildroot}
make install DESTDIR=%{buildroot}
%if 0%{?with_python3}
make clean
%configure --with-python=%{__python3}
make install DESTDIR=%{buildroot}
%endif # with_python3
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
...
@@ -136,14 +168,30 @@ rm -fr %{buildroot}
...
@@ -136,14 +168,30 @@ rm -fr %{buildroot}
%files python
%files python
%defattr(-, root, root)
%defattr(-, root, root)
%{_libdir}/python*/site-packages/libxml2.py*
%{_libdir}/python2*/site-packages/libxml2.py*
%{_libdir}/python*/site-packages/drv_libxml2.py*
%{_libdir}/python2*/site-packages/drv_libxml2.py*
%{_libdir}/python*/site-packages/libxml2mod*
%{_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/TODO
%doc python/libxml2class.txt
%doc python/libxml2class.txt
%doc python/tests/*.py
%doc python/tests/*.py
%doc doc/*.py
%doc doc/*.py
%doc doc/python.html
%doc doc/python.html
%endif # with_python3
%changelog
%changelog
* @RELDATE@ Daniel Veillard <veillard@redhat.com>
* @RELDATE@ Daniel Veillard <veillard@redhat.com>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment