forked from pool/python-cssselect
- 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:
committed by
Git OBS Bridge
parent
7ea1eb5203
commit
3ccbce2de9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user