forked from pool/python-transitions
- Update to version 0.8.10 * Feature #545: The literal 'self' (default model parameter of Machine) has been replaced by the class variable Machine.self_literal = 'self'. Machine now performs an identity check (instead of a value check) with mod is self.self_literal to determine whether it should act as a model. While 'self' should still work when passed to the model parameter, we encourage using Machine.self_literal from now on. This was done to enable easier override of Machine.__eq__ in subclasses (thanks @VKSolovev). * Bug #547: Introduce HierarchicalMachine.prefix_path to resolve global state names since the HSM stack is not reliable when queued=True (thanks @jankrejci). * Bug #548: HSM source states were exited even though they are parents of the destination state (thanks @wes-public-apps). - Don't test optional extra graphviz on python36: pygraphviz dropped Python 3.6 support OBS-URL: https://build.opensuse.org/request/show/927204 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=18
79 lines
2.5 KiB
RPMSpec
79 lines
2.5 KiB
RPMSpec
#
|
|
# spec file for package python-transitions
|
|
#
|
|
# Copyright (c) 2021 SUSE LLC
|
|
# Copyright (c) 2019-2021, Martin Hauke <mardnh@gmx.de>
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%bcond_without python2
|
|
Name: python-transitions
|
|
Version: 0.8.10
|
|
Release: 0
|
|
Summary: A lightweight, object-oriented Python state machine implementation
|
|
License: MIT
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/pytransitions/transitions
|
|
Source: https://files.pythonhosted.org/packages/source/t/transitions/transitions-%{version}.tar.gz
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-six
|
|
Suggests: python-pygraphviz
|
|
Suggests: python-pytest
|
|
BuildArch: noarch
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module dill}
|
|
BuildRequires: %{python_module pycodestyle}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module six}
|
|
# pygraphviz dropped support for Python 3.6
|
|
BuildRequires: %{python_module graphviz if (%python-base without python36-base)}
|
|
BuildRequires: %{python_module pygraphviz if (%python-base without python36-base)}
|
|
%if %{with python2}
|
|
BuildRequires: python2-mock
|
|
%endif
|
|
# png support for graphviz
|
|
BuildRequires: graphviz-gnome
|
|
# /SECTION
|
|
%python_subpackages
|
|
|
|
%description
|
|
The transitions package makes it convenient and relatively easy to define and
|
|
implement FSMs (finite state machines) in python.
|
|
|
|
%prep
|
|
%setup -q -n transitions-%{version}
|
|
find . -type f -exec chmod -x {} \;
|
|
sed -i 's/\r$//' LICENSE Changelog.md README.md
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%pytest --ignore tests/test_codestyle.py
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc Changelog.md README.md
|
|
%{python_sitelib}/transitions
|
|
%{python_sitelib}/transitions-%{version}*-info
|
|
|
|
%changelog
|