From 3ccbce2de95a7a37e792eeac01e4cf218ca9e5b7a2735a3454a438ed5488790d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 20 Sep 2019 08:39:58 +0000 Subject: [PATCH] - Switch to multibuild to avoid build cycle with lxml OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cssselect?expand=0&rev=20 --- _multibuild | 3 +++ python-cssselect.changes | 5 +++++ python-cssselect.spec | 22 +++++++++++++++++++--- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-cssselect.changes b/python-cssselect.changes index 1f5be11..356dcea 100644 --- a/python-cssselect.changes +++ b/python-cssselect.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Sep 20 08:39:42 UTC 2019 - Tomáš Chvátal + +- Switch to multibuild to avoid build cycle with lxml + ------------------------------------------------------------------- Fri Sep 13 10:31:51 UTC 2019 - Tomáš Chvátal diff --git a/python-cssselect.spec b/python-cssselect.spec index a94d612..a5153a3 100644 --- a/python-cssselect.spec +++ b/python-cssselect.spec @@ -17,7 +17,15 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -Name: python-cssselect +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +Name: python-cssselect%{psuffix} Version: 1.1.0 Release: 0 Summary: CSS3 selectors for Python @@ -25,12 +33,14 @@ License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/scrapy/cssselect Source: https://github.com/scrapy/cssselect/archive/v%{version}.tar.gz -BuildRequires: %{python_module lxml} -BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch +%if %{with test} +BuildRequires: %{python_module lxml} +BuildRequires: %{python_module pytest} +%endif %python_subpackages %description @@ -48,15 +58,21 @@ extracted as a stand-alone project. %python_build %install +%if !%{with test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %check +%if %{with test} %pytest +%endif +%if !%{with test} %files %{python_files} %{python_sitelib}/* %license LICENSE %doc README.rst CHANGES AUTHORS +%endif %changelog