Files
python-control/python-control.spec
Benjamin Greiner c2498311a0 - Update to 0.10.2
* This release includes numerous bug fixes and improvements, with major changes such as a substantial reorganization of the documentation into a User Guide and Reference Manual, more consistent and complete docstrings, and support for referencing signals and subsystems by name as well as by index. Phase plane plots now use matplotlib’s streamplot for better visuals. New functions include combine_tf and split_tf for MIMO/SISO conversion and disk_margins for stability analysis. Additional improvements include consistent keyword usage, expanded LTI system methods for plotting and responses, better error messages, and legacy aliases to maintain backward compatibility.
* This version of python-control requires Python 3.10 or higher, NumPy 1.23 or higher (2.x recommended), and SciPy 1.8 or higher.
  ## New classes, functions, and methods
  *  find_operating_point: this function replaces (with a legacy
     alias) the find_eqpt function and now returns an
     OperatingPoint object containing the information about the
     operating point.
  *  combine_tf and split_tf: these two new functions allow you to
     create an MIMO transfer function from SISO transfer functions
     and vice versa.
  *  create_statefbk_iosystem now allows the creation of state
     feedback controllers using a “reference gain” pattern (u =
     k_\text{f}\, r - K x) in addition to the default “trajectory
     generation” pattern (u = u_\text{d} - K(x - x_\text{d})).
  *  disk_margins: compute disk-based stability margins for SISO
     and MIMO systems.
  *  model_reduction: allow specific states, inputs, or outputs to
     be either eliminated or retained.
  *  place_acker: renamed version of acker (which is still
     accessible via an alias).
  ## Bug fixes
  *  phase_plane_plot: fixed a bug in which the return value was
     returning a sublist of lines rather than just a list of lines
     in cplt.lines.
  *  Processing of the timebase parameter (dt) for I/O systems is
     now handled uniformly across all I/O system factory functions.
     This affected the zpk function, which was defaulting to a
     discrete time system to have timebase None instead of 0.
  *  Multiplying (*), adding (+), or subtracting (-) a constant

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-control?expand=0&rev=66
2025-07-23 10:03:23 +00:00

97 lines
3.5 KiB
RPMSpec

#
# spec file for package python-control
#
# Copyright (c) 2025 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/
#
%{?sle15_python_module_pythons}
Name: python-control
Version: 0.10.2
Release: 0
Summary: Python control systems library
License: BSD-3-Clause
URL: https://python-control.org
Source: https://files.pythonhosted.org/packages/source/c/control/control-%{version}.tar.gz
Source1: %{name}-rpmlintrc
BuildRequires: %{python_module base >= 3.10}
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-matplotlib >= 3.6
Requires: python-numpy >= 1.23
Requires: python-scipy >= 1.8
Recommends: python-slycot
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module matplotlib-qt}
BuildRequires: %{python_module PyQt6}
BuildRequires: %{python_module matplotlib >= 3.6}
BuildRequires: %{python_module numpy >= 1.23}
BuildRequires: %{python_module numpydoc}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest-xvfb}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module scipy >= 1.8}
BuildRequires: %{python_module slycot}
# /SECTION
%python_subpackages
%description
The Python Control Systems Library is a Python module that implements basic
operations for analysis and design of feedback control systems.
%prep
%autosetup -p1 -n control-%{version}
# remove shebang from testfiles which could be theoretically run standalone, but we don't do this
sed -i '1{\@^#!/usr/bin/env@ d}' control/tests/*.py
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# The default Agg backend does not define the toolbar attribute in the Figure
# Manager used by some tests, so we run the tests with the Qt backend
export MPLBACKEND="QtAgg"
# precision issues
donttest="test_lti_nlsys_response"
# don't check if upstream has all the documentation
donttest="test_sphinxdocs"
# flaky precision issues
donttest="$donttest or test_response_plot_kwargs"
donttest="$donttest or test_sample_system_prewarp"
donttest="$donttest or (test_nonuniform_timepts and 4-2-3)"
donttest="$donttest or test_linear_interconnection"
# gh#python-control/python-control#838
[ "${RPM_ARCH}" != "x86_64" ] && donttest="$donttest or (test_optimal_doc and shooting-3-u0-None)"
# causes i586 segfaults in matplotlib after successful balanced model reduction tests
[ $(getconf LONG_BIT) -eq 32 ] && donttest="$donttest or testBalredMatchDC"
%pytest -n auto -k "not (${donttest})"
%files %{python_files}
%doc ChangeLog README.rst
%license LICENSE
%{python_sitelib}/control
%{python_sitelib}/control-%{version}.dist-info
%changelog