# # spec file for package python-Automat # # Copyright (c) 2024 SUSE LLC # # 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/ # %global flavor %{nil} %if "%{flavor}" == "test" %define psuffix -test %bcond_without test %else %define psuffix %{nil} %bcond_with test %endif %{?sle15_python_module_pythons} Name: python-Automat%{psuffix} Version: 24.8.1 Release: 1.5 Summary: Self-service finite-state machines for the programmer on the go License: MIT URL: https://github.com/glyph/automat Source: https://files.pythonhosted.org/packages/source/A/Automat/automat-%{version}.tar.gz BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-attrs >= 19.2.0 Requires(post): update-alternatives Requires(preun): update-alternatives Suggests: python-Twisted >= 16.1.1 Suggests: python-graphviz > 0.5.1 BuildArch: noarch %if %{with test} BuildRequires: %{python_module Twisted >= 16.1.1} BuildRequires: %{python_module attrs >= 19.2.0} BuildRequires: %{python_module graphviz >= 0.5.1} BuildRequires: %{python_module pytest} %endif %python_subpackages %description Automat is a library for concise, idiomatic Python expression of finite-state automata (particularly deterministic finite-state transducers). %prep %autosetup -p1 -n automat-%{version} %build %pyproject_wheel %install %if !%{with test} %pyproject_install %python_clone -a %{buildroot}%{_bindir}/automat-visualize %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif %check %if %{with test} %pytest src/automat/_test %endif %if !%{with test} %post %python_install_alternative automat-visualize %postun %python_uninstall_alternative automat-visualize %files %{python_files} %license LICENSE %doc README.md %python_alternative %{_bindir}/automat-visualize %{python_sitelib}/automat %{python_sitelib}/Automat-%{version}.dist-info %endif %changelog * Tue Oct 29 2024 Dirk Müller - update to 24.8.1: * major new api * python 3.12/3.13 * Tue Sep 19 2023 Ondřej Súkup - remove unneded six from setup.py * Fri Apr 21 2023 Dirk Müller - add sle15_python_module_pythons (jsc#PED-68) * Thu Apr 13 2023 Matej Cepl - Make calling of %%{sle15modernpython} optional. * Tue Jan 10 2023 Daniel Garcia - Update to 22.10.0 * Fix _test_visualize.py twisted import errors * Fix #17: Allow enter to have a default * Use CodeType.replace() in copycode for Python > 3.8 * Thu Dec 9 2021 Ben Greiner - Don't buildrequire unmaintained m2r * Tue Feb 18 2020 Ondřej Súkup - update to 20.2.0 * Fix attrs warnings * Mon Nov 25 2019 Steve Kowalik - Update to version 0.8.0: * Retrieve the version from the installed distribution. * Add support for Python 3.8 * Remove support for 3.4 * Thu Mar 7 2019 Tomáš Chvátal - Add mulitbuild to make sure we do not cycle * Tue Mar 5 2019 Tomáš Chvátal - Update to version 0.7.0: * test updates * pep fixes - Run tests * Tue Jul 4 2017 tbechtold@suse.com - update to version v0.6.0 * use version-specific travis environments * tox/travis: enable tests on py3.5 * add a comment: this check doesn't catch non-None returns * improve function-is-empty test to work on py3.6 too * add more metadata to setup * graphviz() -> asDigraph() * Use inspect.getfullargspec on Py3 to avoid deprecation warnings with inspect.getargspec * add tracing API, with docs * Conform author metadata to `distutils.core` API * tracer can return a callable to see Output invocations * Make hashable classes frozen for attrs 17.1.0 (fixes #62). * Assert that 'input' function bodies are empty, to avoid surprises. * reject duplicate transitions (same starting state and input) * tox/travis: enable tests on py3.6 * improve tests: more cases, make pyflakes-clean * sigh, add more code to attain full test coverage * make setTrace a private API, document cautions about its use * cover the specimen functions in tests, remove ordify() * cleanup: s/assert_no_code/assertNoCode/ - convert to singlespec - fix Source url * Tue Jan 24 2017 termim@gmail.com - Initial check in version 0.4.0