14
0
forked from pool/python-lxml

Accepting request 487430 from home:matejcik:branches:devel:languages:python

- lxml-fix-attribute-quoting.patch - stabilize attribute entity encoding
  across platforms
- force-regenerate C code from Cython sources

OBS-URL: https://build.opensuse.org/request/show/487430
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=94
This commit is contained in:
Jan Matejek
2017-04-11 17:15:01 +00:00
committed by Git OBS Bridge
parent 650aff5862
commit cb3e4ae097
3 changed files with 109 additions and 3 deletions

View File

@@ -27,6 +27,8 @@ Url: https://lxml.de/
Source: https://files.pythonhosted.org/packages/source/l/lxml/lxml-%{version}.tar.gz
#Source1: https://lxml.de/lxmldoc-%{version}.pdf
Source1: lxmldoc-%{version}.pdf
# PATCH-FIX-UPSTREAM fix attribute quoting inactive code https://github.com/lxml/lxml/pull/238
Patch0: lxml-fix-attribute-quoting.patch
BuildRequires: %{python_module Cython >= 0.22.1}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools >= 18.0.1}
@@ -75,16 +77,22 @@ This package contains header files needed to use lxml's C API.
%prep
%setup -q -n lxml-%{version}
cp %{SOURCE1} .
%patch0 -p1
# remove generated files
rm src/lxml/lxml.etree.c
rm src/lxml/lxml.etree.h
rm src/lxml/lxml.etree_api.h
rm src/lxml/lxml.objectify.c
%build
export CFLAGS="%{optflags}"
%python_build
%python_build --with-cython
%check
# The tests fail on SLE 11 due to broken incremental parsing
# in libxml2
export CFLAGS="%{optflags}"
%python_exec setup.py build_ext --inplace
LANG=en_US.UTF-8 PYTHONUNBUFFERED=x make test
LANG=en_US.UTF-8 PYTHONUNBUFFERED=x make test3