File python-invoke.spec of Package python-invoke
#
# spec file for package python-invoke
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# Tests have a dependency loop with python(2|3)-invocations
%bcond_with test
Name: python-invoke
Version: 0.22.1
Release: 0
Summary: Pythonic Task Execution
License: BSD-2-Clause
Group: Development/Languages/Python
Url: http://www.pyinvoke.org
Source: https://files.pythonhosted.org/packages/source/i/invoke/invoke-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module invocations}
BuildRequires: %{python_module nose}
BuildRequires: python-mock
%endif
BuildArch: noarch
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
Invoke is a Python (2.7 and 3.4+) task execution tool & library, drawing
inspiration from various sources to arrive at a powerful & clean feature set.
* Like Ruby's Rake tool and Invoke's own predecessor Fabric 1.x, it provides a
clean, high level API for running shell commands and defining/organizing
task functions from a ``tasks.py`` file
* From GNU Make, it inherits an emphasis on minimal boilerplate for common
patterns and the ability to run multiple tasks in a single invocation::
$ invoke clean build
* Following the lead of most Unix CLI applications, it offers a traditional
flag-based style of command-line parsing, deriving flag names and value types
from task signatures (optionally, of course!)::
$ invoke clean --docs --bytecode build --docs --extra='**/*.pyo'
$ invoke clean -d -b build --docs -e '**/*.pyo'
$ invoke clean -db build -de '**/*.pyo'
* Like many of its predecessors, it offers advanced features as well --
namespacing, task aliasing, before/after hooks, parallel execution and more.
%prep
%setup -q -n invoke-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/inv
%python_clone -a %{buildroot}%{_bindir}/invoke
%if %{with test}
%check
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
%{buildroot}%{_bindir}/inv-%{$python_bin_suffix} -l
}
%endif
%post
%{python_install_alternative inv invoke}
%postun
%python_uninstall_alternative inv
%files %{python_files}
%defattr(-,root,root)
%doc LICENSE README.rst
%python_alternative %{_bindir}/inv
%python_alternative %{_bindir}/invoke
%{python_sitelib}/invoke/
%{python_sitelib}/invoke-%{version}-py*
%changelog