15
0

- Use github tag to get the tarball with tests

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-invocations?expand=0&rev=7
This commit is contained in:
Tomáš Chvátal
2018-08-11 10:21:49 +00:00
committed by Git OBS Bridge
parent 78cefe93f5
commit fd73ad4ebf
4 changed files with 20 additions and 12 deletions

View File

@@ -18,14 +18,10 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%global flavor @BUILD_FLAVOR@%{nil}
%bcond_with test
%if "%{flavor}" == "test"
%bcond_without test
%endif
%if %{with test}
Name: python-invocations-%{flavor}
%else
Name: python-invocations
%bcond_with test
%endif
Version: 1.4.0
Release: 0
@@ -33,7 +29,7 @@ Summary: Reusable Invoke tasks
License: BSD-2-Clause
Group: Development/Languages/Python
URL: http://pyinvoke.org
Source: https://files.pythonhosted.org/packages/source/i/invocations/invocations-%{version}.tar.gz
Source: https://github.com/pyinvoke/invocations/archive/%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -43,18 +39,27 @@ Requires: python-releases >= 1.2
Requires: python-semantic_version >= 2.4
Requires: python-tabulate >= 0.7.5
Requires: python-tqdm >= 4.8.1
BuildArch: noarch
%if %{with test}
Name: python-invocations-%{flavor}
%else
Name: python-invocations
%endif
%ifpython2
Requires: python-enum34
%endif
BuildRequires: python2-enum34
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module blessings >= 1.6}
BuildRequires: %{python_module invocations = %{version}}
BuildRequires: %{python_module invoke >= 1.0}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pytest-relaxed}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module releases >= 1.2}
BuildRequires: %{python_module semantic_version >= 2.4}
BuildRequires: %{python_module tabulate >= 0.7.5}
BuildRequires: %{python_module tqdm >= 4.8.1}
BuildRequires: python2-enum34
%endif
%python_subpackages
@@ -83,7 +88,9 @@ the Invoke project's communication channels for updates. Thanks!
%if %{with test}
%check
%python_exec setup.py test
%{python_expand export PYTHONPATH=%{$python_sitelib}
py.test-%{$python_bin_suffix}
}
%endif
%files %{python_files}