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