15
0

- 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
This commit is contained in:
Tomáš Chvátal
2019-09-20 08:39:58 +00:00
committed by Git OBS Bridge
parent 7ea1eb5203
commit 3ccbce2de9
3 changed files with 27 additions and 3 deletions

3
_multibuild Normal file
View File

@@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Sep 20 08:39:42 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Switch to multibuild to avoid build cycle with lxml
-------------------------------------------------------------------
Fri Sep 13 10:31:51 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@@ -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