%define _lxml lxml
Summary: lxml is a Pythonic binding for the libxml2 and libxslt libraries
Summary(ja): lxml は libxml2 と libxslt の Python バインディングです
Name: python-%{_lxml}
Version: 4.9.1
Release: 1%{?_dist_release}
Group: programming
Vendor: Project Vine
Distribution: Vine Linux

License: BSD
URL: https://lxml.de/
#URL: http://pypi.python.org/pypi/lxml
Source: https://pypi.python.org/packages/source/l/%{_lxml}/%{_lxml}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root

BuildRequires: libxml2-devel >= 2.6.21
BuildRequires: libxslt-devel >= 1.1.15
BuildRequires: python-rpm-macros

BuildRequires: python-devel >= 2.3
BuildRequires: python2-rpm-macros
BuildRequires: python2-setuptools
BuildRequires: python-pyrex

BuildRequires: python3-devel

%description
lxml is a Pythonic binding for the libxml2_ and libxslt_ libraries.  It is
unique in that it combines the speed and feature completeness of these
libraries with the simplicity of a native Python API, mostly compatible but
superior to the well-known ElementTree_ API.  See the introduction_ for more
information about background and goals.


%package -n python3-lxml
Summary: lxml is a Pythonic binding for the libxml2 and libxslt libraries
Summary(ja): lxml は libxml2 と libxslt の Python バインディングです
Group: programming

%description -n python3-lxml
lxml is a Pythonic binding for the libxml2_ and libxslt_ libraries.  It is
unique in that it combines the speed and feature completeness of these
libraries with the simplicity of a native Python API, mostly compatible but
superior to the well-known ElementTree_ API.  See the introduction_ for more
information about background and goals.


%debug_package


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


%build
%py2_build
%pip3_build_wheel


%install
rm -rf $RPM_BUILD_ROOT
%py2_install
%pip3_install_wheel

find doc/ -type f | xargs chmod -x


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%license LICENSE*
%doc CHANGES.txt CREDITS.txt README.* TODO.txt
%doc doc
%{python2_sitearch}/%{_lxml}
%{python2_sitearch}/%{_lxml}-*-info

%files -n python3-lxml
%defattr(-,root,root)
%license LICENSE*
%doc CHANGES.txt CREDITS.txt README.* TODO.txt
%doc doc
%{python3_sitearch}/%{_lxml}
%{python3_sitearch}/%{_lxml}-*-info


%changelog
* Tue Nov 01 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.9.1-1
- new upstream release.

* Thu Mar 25 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.6.3-1
- new upstream release.

* Wed Aug 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.5.2-2
- fixed dependency.

* Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.5.2-1
- new upstream release.

* Sat Sep 09 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.8.0-1
- new upstream release.
- added python3 support.

* Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.6-4
- rebuild with VineSeed environment

* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.6-3
- rebuild with python-2.7.2

* Wed Mar 10 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 2.2.6-2
- change required version of libxml2-devel for Vine Plus/5
  (2.7.2 or later is recomended, but works with 2.6.21 or later)

* Sun Mar 07 2010 Shu KONNO <owa@bg.wakwak.com> 2.2.6-1
- initial build for vine linux

