From 51efc15d3339ac737821f76485fcfd67ab9f5404ac0066ac6a8f0f63f9526cf9 Mon Sep 17 00:00:00 2001 From: Jan Matejek <ja+suse@matejcik.cz> Date: Tue, 31 Oct 2017 14:25:20 +0000 Subject: [PATCH] - run tests only when the appropriate pythons are available OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=101 --- python-lxml.changes | 5 +++++ python-lxml.spec | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/python-lxml.changes b/python-lxml.changes index 9580411..ad0c31b 100644 --- a/python-lxml.changes +++ b/python-lxml.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 31 14:24:25 UTC 2017 - jmatejek@suse.com + +- run tests only when the appropriate pythons are available + ------------------------------------------------------------------- Mon Sep 18 06:05:54 UTC 2017 - thomas.schraitle@suse.com diff --git a/python-lxml.spec b/python-lxml.spec index 52dd137..0d0ec37 100644 --- a/python-lxml.spec +++ b/python-lxml.spec @@ -90,8 +90,14 @@ export CFLAGS="%{optflags}" # The tests fail on SLE 11 due to broken incremental parsing # in libxml2 export CFLAGS="%{optflags}" -LANG=en_US.UTF-8 PYTHONUNBUFFERED=x make test -LANG=en_US.UTF-8 PYTHONUNBUFFERED=x make test3 +export LANG=en_US.UTF-8 +export PYTHONUNBUFFERED=x +%if 0%{?have_python2} +make test +%endif +%if 0%{?have_python3} +make test3 +%endif %install %python_install