Bump to 3.6.4

This commit is contained in:
Fabio Alessandro Locati 2016-09-17 12:50:18 +02:00
parent ff3eeccbe7
commit f61642a334
4 changed files with 60 additions and 142 deletions

1
.gitignore vendored
View File

@ -40,3 +40,4 @@ lxml-2.2.7.tar.gz.asc
/lxml-3.3.6.tgz.asc /lxml-3.3.6.tgz.asc
/lxml-3.4.4.tgz /lxml-3.4.4.tgz
/lxml-3.4.4.tgz.asc /lxml-3.4.4.tgz.asc
/lxml-3.6.4.tar.gz

View File

@ -1,13 +0,0 @@
diff -up lxml-2.2.6/src/lxml/html/__init__.py.fix-2to3 lxml-2.2.6/src/lxml/html/__init__.py
--- lxml-2.2.6/src/lxml/html/__init__.py.fix-2to3 2010-07-26 13:36:42.333672181 -0400
+++ lxml-2.2.6/src/lxml/html/__init__.py 2010-07-26 13:36:52.379671732 -0400
@@ -823,7 +823,8 @@ def submit_form(form, extra_values=None,
def open_http_urllib(method, url, values):
## FIXME: should test that it's not a relative URL or something
try:
- from urllib import urlencode, urlopen
+ from urllib import urlencode
+ from urllib import urlopen
except ImportError: # Python 3
from urllib.request import urlopen
from urllib.parse import urlencode

View File

@ -1,159 +1,90 @@
%if 0%{?fedora} > 12 %global pypi_name lxml
%global with_python3 1
%endif
%if 0%{?fedora} >= 20 Name: python-%{pypi_name}
%global with_python3_cssselect 1 Version: 3.6.4
%endif Release: 1%{?dist}
Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
Name: python-lxml
Version: 3.4.4
Release: 5%{?dist}
Summary: ElementTree-like Python bindings for libxml2 and libxslt
Group: Development/Libraries
License: BSD License: BSD
URL: http://lxml.de URL: http://lxml.de
Source0: http://lxml.de/files/lxml-%{version}.tgz Source0: https://files.pythonhosted.org/packages/source/l/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
Source1: http://lxml.de/files/lxml-%{version}.tgz.asc
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel BuildRequires: libxslt-devel
BuildRequires: python-devel
BuildRequires: python-setuptools BuildRequires: python-setuptools
BuildRequires: python-cssselect BuildRequires: python2-devel
BuildRequires: Cython >= 0.20
Requires: python-cssselect
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
%if 0%{?with_python3_cssselect} BuildRequires: python3-devel
BuildRequires: python3-cssselect
%endif
%endif
%description %description
lxml provides a Python binding to the libxslt and libxml2 libraries. lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It
It follows the ElementTree API as much as possible in order to provide provides safe and convenient access to these libraries using the ElementTree It
a more Pythonic interface to libxml2 and libxslt than the default extends the ElementTree API significantly to offer support for XPath, RelaxNG,
bindings. In particular, lxml deals with Python Unicode strings XML Schema, XSLT, C14N and much more.To contact the project, go to the project
rather than encoded UTF-8 and handles memory management automatically, home page < or see our bug tracker at case you want to use the current ...
unlike the default bindings.
%package docs %package -n python2-%{pypi_name}
Summary: Documentation for %{name} Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API
Group: Documentation Requires: python-cssselect
BuildArch: noarch Requires: python-html5lib
%description docs Requires: python-beautifulsoup4
This package provides the documentation for %{name}, e.g. the API as html. %{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name}
lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It
provides safe and convenient access to these libraries using the ElementTree It
extends the ElementTree API significantly to offer support for XPath, RelaxNG,
XML Schema, XSLT, C14N and much more.To contact the project, go to the project
home page < or see our bug tracker at case you want to use the current ...
%if 0%{?with_python3} %package -n python3-%{pypi_name}
%package -n python3-lxml Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API
Summary: ElementTree-like Python 3 bindings for libxml2 and libxslt
Group: Development/Libraries
%if 0%{?with_python3_cssselect}
Requires: python3-cssselect Requires: python3-cssselect
%endif Requires: python3-html5lib
Requires: python3-beautifulsoup4
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-lxml %description -n python3-%{pypi_name}
lxml provides a Python 3 binding to the libxslt and libxml2 libraries. lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It
It follows the ElementTree API as much as possible in order to provide provides safe and convenient access to these libraries using the ElementTree It
a more Pythonic interface to libxml2 and libxslt than the default extends the ElementTree API significantly to offer support for XPath, RelaxNG,
bindings. In particular, lxml deals with Python 3 Unicode strings XML Schema, XSLT, C14N and much more.To contact the project, go to the project
rather than encoded UTF-8 and handles memory management automatically, home page < or see our bug tracker at case you want to use the current ...
unlike the default bindings.
%endif
%prep %prep
%setup -q -n lxml-%{version} %autosetup -n %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info
# remove the C extension so that it will be rebuilt using the latest Cython
rm -f src/lxml/lxml.etree.c
rm -f src/lxml/lxml.etree.h
rm -f src/lxml/lxml.etree_api.h
rm -f src/lxml/lxml.objectify.c
chmod a-x doc/rest2html.py
sed -i 's/\r//' doc/s5/ui/default/print.css \
doc/s5/ep2008/atom.rng \
doc/s5/ui/default/iepngfix.htc
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -r . %{py3dir}
%endif
%build %build
CFLAGS="%{optflags}" %{__python} setup.py build --with-cython %py2_build
%py3_build
%if 0%{?with_python3}
cp src/lxml/lxml.etree.c %{py3dir}/src/lxml
cp src/lxml/lxml.etree.h %{py3dir}/src/lxml
cp src/lxml/lxml.etree_api.h %{py3dir}/src/lxml
cp src/lxml/lxml.objectify.c %{py3dir}/src/lxml
pushd %{py3dir}
CFLAGS="%{optflags}" %{__python3} setup.py build --with-cython
popd
%endif
%install %install
%{__python} setup.py install --skip-build --no-compile --with-cython --root %{buildroot} %py3_install
%py2_install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --no-compile --with-cython --root %{buildroot}
popd
%endif
%check %check
BUILD_LIB_DIR=$(find $(pwd) -name "*.so" | head -n 1 | xargs dirname) %{__python2} setup.py test
cp $BUILD_LIB_DIR/*.so src/lxml %{__python3} setup.py test
export LANG=en_US.utf8
%{__python} test.py -p -v
export PYTHONPATH=src
%{__python} selftest.py
%{__python} selftest2.py
%if 0%{?with_python3} %files -n python2-%{pypi_name}
pushd %{py3dir} %license doc/licenses/ZopePublicLicense.txt LICENSES.txt
%doc README.rst src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt
%{python2_sitearch}/%{pypi_name}
%{python2_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info
BUILD_LIB_DIR=$(find $(pwd) -name "*.so" | head -n 1 | xargs dirname) %files -n python3-%{pypi_name}
cp $BUILD_LIB_DIR/*.so src/lxml %license doc/licenses/ZopePublicLicense.txt LICENSES.txt
export LANG=en_US.utf8 %doc README.rst src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt
%{__python3} test.py -p -v %{python3_sitearch}/%{pypi_name}
export PYTHONPATH=src %{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info
%{__python3} selftest.py
%{__python3} selftest2.py
popd
%endif
%files
%{!?_licensedir:%global license %%doc}
%license LICENSES.txt
%doc PKG-INFO CREDITS.txt CHANGES.txt
%{python_sitearch}/lxml
%{python_sitearch}/lxml-*.egg-info
%files docs
%doc doc/*
%if 0%{?with_python3}
%files -n python3-lxml
%license LICENSES.txt
%doc PKG-INFO CREDITS.txt CHANGES.txt
%{python3_sitearch}/lxml-*.egg-info
%{python3_sitearch}/lxml
%endif
%changelog %changelog
* Thu Sep 08 2016 Fabio Alessandro Locati <fale@redhat.com> - 3.6.4-1
- Update to 3.6.4
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.4-5 * Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.4-5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

View File

@ -1,2 +1 @@
a9a65972afc173ec7a39c585f4eea69c lxml-3.4.4.tgz 6dd7314233029d9dab0156e7b1c7830b lxml-3.6.4.tar.gz
32178b79a94cff09e71b562bfa65c60a lxml-3.4.4.tgz.asc