forked from pool/python-jaraco.text
- Use multibuild to avoid buildcycle
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jaraco.text?expand=0&rev=4
This commit is contained in:
committed by
Git OBS Bridge
parent
c32cc8fa82
commit
a51249821c
@@ -17,28 +17,37 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-jaraco.text
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
Name: python-jaraco.text%{psuffix}
|
||||
Version: 2.0
|
||||
Release: 0
|
||||
Summary: Tools to work with text
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
Url: https://github.com/jaraco/jaraco.text
|
||||
URL: https://github.com/jaraco/jaraco.text
|
||||
Source0: https://files.pythonhosted.org/packages/source/j/jaraco.text/jaraco.text-%{version}.tar.gz
|
||||
BuildRequires: %{python_module jaraco.base >= 6.1}
|
||||
BuildRequires: %{python_module jaraco.collections}
|
||||
BuildRequires: %{python_module jaraco.functools}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools_scm}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildArch: noarch
|
||||
Requires: python-jaraco.base >= 6.1
|
||||
Requires: python-jaraco.collections
|
||||
Requires: python-jaraco.functools
|
||||
Requires: python-six
|
||||
|
||||
BuildArch: noarch
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module jaraco.collections}
|
||||
BuildRequires: %{python_module jaraco.functools}
|
||||
BuildRequires: %{python_module pytest}
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -53,6 +62,7 @@ rm -rf jaraco.text.egg-info
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
%python_install
|
||||
|
||||
%{python_expand rm -f %{buildroot}%{$python_sitelib}/jaraco/__init__.py* \
|
||||
@@ -61,17 +71,22 @@ $python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/jarac
|
||||
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/jaraco/
|
||||
%fdupes %{buildroot}%{$python_sitelib}
|
||||
}
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
%{python_expand py.test-%{$python_bin_suffix} \
|
||||
--ignore=_build.python2 --ignore=_build.python3
|
||||
}
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc docs/*.rst README.rst CHANGES.rst
|
||||
%{python_sitelib}/jaraco.text-%{version}-py*.egg-info
|
||||
%{python_sitelib}/jaraco/text.py*
|
||||
%pycache_only %{python_sitelib}/jaraco/__pycache__/text*.py*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user