Files
python-control/python-control.spec

90 lines
3.2 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-control
#
# 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/
#
Name: python-control
Accepting request 1165670 from home:bnavigator:branches:devel:languages:python:numeric - Update to 0.10.0 * Multivariable interconnect functionality by @murrayrm in #881 * Remove NumPy matrix class by @murrayrm in #913 * I/O system class restructuring by @murrayrm in #916 * Documentation fixes by @KybernetikJo in #919, #921, #922, #923 * Add two MRAC siso examples by @KybernetikJo in #914 * Time response plots by @murrayrm in #920 * Print a connection table for interconnected systems by @sawyerbfuller in #925 * Update frequency response plots to use _response/_plot pattern by @murrayrm in #924 * create_statefbk_iosystem and optimal control enhancements by @murrayrm in #930 * Add unit test illustrating issue #935 + add method keyword for tf2ss by @murrayrm in #937 * Vectorize optimal control cost calculation by @urpok23 in #940 * Improved speed of ctrb and obsv functions by @Jpickard1 in #941 * Fix sphinx bug (erroneous use of class template) by @murrayrm in #943 * Fix bug in matched transformation + address other issues in #950 by @murrayrm in #951 * Fix typo in header of Hinf example by @jrforbes in #946 * Fix typo in stochresp.py by @alex-damjanovic in #945 * Fix TimeResponseData.to_pandas() to handle zero state case by @murrayrm in #958 * Update pole/zero and root locus plots to use _map/_plot pattern by @murrayrm in #953 * Fix CI warnings by @murrayrm in #955 * Support Python 3.12, bump minimum support according to SPEC 0 by @bnavigator in #961 OBS-URL: https://build.opensuse.org/request/show/1165670 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-control?expand=0&rev=49
2024-04-05 14:50:56 +00:00
Version: 0.10.0
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
# PATCH-FIX-UPSTREAM control-pr994-numpy2.patch gh#python-control/python-control#994
Patch1: control-pr994-numpy2.patch
Accepting request 1045948 from home:bnavigator:branches:devel:languages:python:numeric - Update to 0.9.3.post2 * Improvements in optimal and flatsys modules, updated passivity module, gain scheduling support, bug fixes * Handle t_eval for static systems in input_output_response by @murrayrm in #743 * add GitHub URL for PyPi by @andriyor in #708 * Remove Deprecated API calls to Pytest, SciPy <1.3, Python 2 by @bnavigator in #745 * Add passivity module, ispassive function, and passivity_test. Introduces optional dependency cvxopt. by @Mark-Yeatman in #739 * Slycot source uses setuptools_scm now by @bnavigator in #751 * Passivity indices and support for discrete time systems. by @Mark-Yeatman in #750 * Switch CI to mambaforge and conda-forge channel by @bnavigator in #757 * Fix timebase bug in InterconnectedSystem (issue #754) by @murrayrm in #755 * fix issue with slycot balred change in state by @bnavigator in #762 * Build system and test suite update by @bnavigator in #759 * fix control.matlab.lsim bug for discrete time system by @murrayrm in #765 * Add B-splines and solve_flat_ocp to flatsys by @murrayrm in #763 * CI: switch slycot and cvxopt installation order by @murrayrm in #769 * Fixed a couple of typos in documentation by @fredrhen in #775 * Allow new matplotlib 3.6 error message in kwargs tests by @bnavigator in #777 * Move sys._update_params(params) before TimeResponseData return OBS-URL: https://build.opensuse.org/request/show/1045948 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-control?expand=0&rev=38
2022-12-31 22:05:03 +00:00
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module pip}
Accepting request 1045948 from home:bnavigator:branches:devel:languages:python:numeric - Update to 0.9.3.post2 * Improvements in optimal and flatsys modules, updated passivity module, gain scheduling support, bug fixes * Handle t_eval for static systems in input_output_response by @murrayrm in #743 * add GitHub URL for PyPi by @andriyor in #708 * Remove Deprecated API calls to Pytest, SciPy <1.3, Python 2 by @bnavigator in #745 * Add passivity module, ispassive function, and passivity_test. Introduces optional dependency cvxopt. by @Mark-Yeatman in #739 * Slycot source uses setuptools_scm now by @bnavigator in #751 * Passivity indices and support for discrete time systems. by @Mark-Yeatman in #750 * Switch CI to mambaforge and conda-forge channel by @bnavigator in #757 * Fix timebase bug in InterconnectedSystem (issue #754) by @murrayrm in #755 * fix issue with slycot balred change in state by @bnavigator in #762 * Build system and test suite update by @bnavigator in #759 * fix control.matlab.lsim bug for discrete time system by @murrayrm in #765 * Add B-splines and solve_flat_ocp to flatsys by @murrayrm in #763 * CI: switch slycot and cvxopt installation order by @murrayrm in #769 * Fixed a couple of typos in documentation by @fredrhen in #775 * Allow new matplotlib 3.6 error message in kwargs tests by @bnavigator in #777 * Move sys._update_params(params) before TimeResponseData return OBS-URL: https://build.opensuse.org/request/show/1045948 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-control?expand=0&rev=38
2022-12-31 22:05:03 +00:00
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-matplotlib
Requires: python-numpy
Accepting request 1045948 from home:bnavigator:branches:devel:languages:python:numeric - Update to 0.9.3.post2 * Improvements in optimal and flatsys modules, updated passivity module, gain scheduling support, bug fixes * Handle t_eval for static systems in input_output_response by @murrayrm in #743 * add GitHub URL for PyPi by @andriyor in #708 * Remove Deprecated API calls to Pytest, SciPy <1.3, Python 2 by @bnavigator in #745 * Add passivity module, ispassive function, and passivity_test. Introduces optional dependency cvxopt. by @Mark-Yeatman in #739 * Slycot source uses setuptools_scm now by @bnavigator in #751 * Passivity indices and support for discrete time systems. by @Mark-Yeatman in #750 * Switch CI to mambaforge and conda-forge channel by @bnavigator in #757 * Fix timebase bug in InterconnectedSystem (issue #754) by @murrayrm in #755 * fix issue with slycot balred change in state by @bnavigator in #762 * Build system and test suite update by @bnavigator in #759 * fix control.matlab.lsim bug for discrete time system by @murrayrm in #765 * Add B-splines and solve_flat_ocp to flatsys by @murrayrm in #763 * CI: switch slycot and cvxopt installation order by @murrayrm in #769 * Fixed a couple of typos in documentation by @fredrhen in #775 * Allow new matplotlib 3.6 error message in kwargs tests by @bnavigator in #777 * Move sys._update_params(params) before TimeResponseData return OBS-URL: https://build.opensuse.org/request/show/1045948 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-control?expand=0&rev=38
2022-12-31 22:05:03 +00:00
Requires: python-scipy >= 1.3
Recommends: python-slycot
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module matplotlib-qt}
BuildRequires: %{python_module matplotlib}
BuildRequires: %{python_module numpy}
Accepting request 1045948 from home:bnavigator:branches:devel:languages:python:numeric - Update to 0.9.3.post2 * Improvements in optimal and flatsys modules, updated passivity module, gain scheduling support, bug fixes * Handle t_eval for static systems in input_output_response by @murrayrm in #743 * add GitHub URL for PyPi by @andriyor in #708 * Remove Deprecated API calls to Pytest, SciPy <1.3, Python 2 by @bnavigator in #745 * Add passivity module, ispassive function, and passivity_test. Introduces optional dependency cvxopt. by @Mark-Yeatman in #739 * Slycot source uses setuptools_scm now by @bnavigator in #751 * Passivity indices and support for discrete time systems. by @Mark-Yeatman in #750 * Switch CI to mambaforge and conda-forge channel by @bnavigator in #757 * Fix timebase bug in InterconnectedSystem (issue #754) by @murrayrm in #755 * fix issue with slycot balred change in state by @bnavigator in #762 * Build system and test suite update by @bnavigator in #759 * fix control.matlab.lsim bug for discrete time system by @murrayrm in #765 * Add B-splines and solve_flat_ocp to flatsys by @murrayrm in #763 * CI: switch slycot and cvxopt installation order by @murrayrm in #769 * Fixed a couple of typos in documentation by @fredrhen in #775 * Allow new matplotlib 3.6 error message in kwargs tests by @bnavigator in #777 * Move sys._update_params(params) before TimeResponseData return OBS-URL: https://build.opensuse.org/request/show/1045948 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-control?expand=0&rev=38
2022-12-31 22:05:03 +00:00
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest-xvfb}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module qt5}
Accepting request 1045948 from home:bnavigator:branches:devel:languages:python:numeric - Update to 0.9.3.post2 * Improvements in optimal and flatsys modules, updated passivity module, gain scheduling support, bug fixes * Handle t_eval for static systems in input_output_response by @murrayrm in #743 * add GitHub URL for PyPi by @andriyor in #708 * Remove Deprecated API calls to Pytest, SciPy <1.3, Python 2 by @bnavigator in #745 * Add passivity module, ispassive function, and passivity_test. Introduces optional dependency cvxopt. by @Mark-Yeatman in #739 * Slycot source uses setuptools_scm now by @bnavigator in #751 * Passivity indices and support for discrete time systems. by @Mark-Yeatman in #750 * Switch CI to mambaforge and conda-forge channel by @bnavigator in #757 * Fix timebase bug in InterconnectedSystem (issue #754) by @murrayrm in #755 * fix issue with slycot balred change in state by @bnavigator in #762 * Build system and test suite update by @bnavigator in #759 * fix control.matlab.lsim bug for discrete time system by @murrayrm in #765 * Add B-splines and solve_flat_ocp to flatsys by @murrayrm in #763 * CI: switch slycot and cvxopt installation order by @murrayrm in #769 * Fixed a couple of typos in documentation by @fredrhen in #775 * Allow new matplotlib 3.6 error message in kwargs tests by @bnavigator in #777 * Move sys._update_params(params) before TimeResponseData return OBS-URL: https://build.opensuse.org/request/show/1045948 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-control?expand=0&rev=38
2022-12-31 22:05:03 +00:00
BuildRequires: %{python_module scipy >= 1.3}
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
- Update to version 0.9.0 * Version 0.9.0 of the Python Control Toolbox (python-control) contains a number of enhanced features and changes to functions. Some of these changes may require modifications to existing user code and, in addition, some default settings have changed that may affect the appearance of plots or operation of certain functions. * Significant new additions including improvements in the I/O systems modules that allow automatic interconnection of signals having the same name (via the interconnect function), generation and plotting of describing functions for closed loop systems with static nonlinearities, and a new optimal control module that allows basic computation of optimal controls (including model predictive controllers). Some of the changes that may break use code include the deprecation of the NumPy matrix type (2D NumPy arrays are used instead), changes in the return value for Nyquist plots (now returns number of encirclements rather than the frequency response), switching the default timebase of systems to be 0 rather than None (no timebase), and changes in the processing of return values for time and frequency responses (to make them more consistent). In many cases, the earlier behavior can be restored by calling use_legacy_defaults('0.8.4'). New Features: * Optimal control module, including rudimentary MPC control (#549 by murrayrm) * Describing functions plots (#521 by murrayrm) * MIMO impulse and step response (#514 by murrayrm) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-control?expand=0&rev=28
2021-03-21 10:23:31 +00:00
%autosetup -p1 -n control-%{version}
Accepting request 1045948 from home:bnavigator:branches:devel:languages:python:numeric - Update to 0.9.3.post2 * Improvements in optimal and flatsys modules, updated passivity module, gain scheduling support, bug fixes * Handle t_eval for static systems in input_output_response by @murrayrm in #743 * add GitHub URL for PyPi by @andriyor in #708 * Remove Deprecated API calls to Pytest, SciPy <1.3, Python 2 by @bnavigator in #745 * Add passivity module, ispassive function, and passivity_test. Introduces optional dependency cvxopt. by @Mark-Yeatman in #739 * Slycot source uses setuptools_scm now by @bnavigator in #751 * Passivity indices and support for discrete time systems. by @Mark-Yeatman in #750 * Switch CI to mambaforge and conda-forge channel by @bnavigator in #757 * Fix timebase bug in InterconnectedSystem (issue #754) by @murrayrm in #755 * fix issue with slycot balred change in state by @bnavigator in #762 * Build system and test suite update by @bnavigator in #759 * fix control.matlab.lsim bug for discrete time system by @murrayrm in #765 * Add B-splines and solve_flat_ocp to flatsys by @murrayrm in #763 * CI: switch slycot and cvxopt installation order by @murrayrm in #769 * Fixed a couple of typos in documentation by @fredrhen in #775 * Allow new matplotlib 3.6 error message in kwargs tests by @bnavigator in #777 * Move sys._update_params(params) before TimeResponseData return OBS-URL: https://build.opensuse.org/request/show/1045948 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-control?expand=0&rev=38
2022-12-31 22:05:03 +00:00
# remove shebang from testfiles which could be theoretically run standalone, but we don't do this
Accepting request 859108 from home:bnavigator:branches:devel:languages:python:numeric - Update to version 0.8.4 * Improved default time vector for time response functions (bnavigator, sawyerbfuller) * New use_legacy_defaults function to allow compatibility with previous versions (sawyerbfuller) * Allow creation of non-proper transfer functions (bnavigator, rlegnain) * Added ability to set arrow head length and width option in nyquist_plot (geekonloose) * Added ability to 'prewarp' the conversion of continuous to discrete-time systems (sawyerbfuller) * Added rlocus capability for discrete-time systems (sawyerbfuller) * Updated pzmap grid to be compatible with matplotlib updates (bnavigator) * Implement loadable string representation (repr) for tf, ss, and frd (repagh) * Fixed margin computation for discrete time systems (bnavigator) * Fixed indexing bug in bdalg.connect (sawyerbfuller) * Fixed InterconnectedSystem naming bugs, improved conventions (samlaf) * Fixed LinearIOSystem output bug in output function (francescoseccamonte) * Fixed bug in forced_response that overrode squeeze parameter (bnavigator) * Use rad/sec for Bode plot in MATLAB bode (was erroneously defaulting to Hertz) (paulvicioso) * Removed deprecated scipy calls and updated to latest numpy (bnavigator) * Multiple documentation updates (bnavigator, laurensvalk) * New and improved examples for sisotool, pvtol (repagh, samlaf) * The rlocus function no longer automatically creates a new figure * Updated unit tests + switch to pytest (bnavigator, sawyerbfuller) * Return type for eigenvalues in lqe changed to 1D array (matches lqr) * Small fixes + documentation updates to markov - Remove forbidden arch macros in noarch package - Drop patches merged upstream * pr365-copy-PR-320-for-robust_array_test.patch * pr366-ease-precision-tolerance.patch * pr380-fix-pytest-discovery.patch * pr430-numpy119delete.patch OBS-URL: https://build.opensuse.org/request/show/859108 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-control?expand=0&rev=23
2020-12-28 22:15:15 +00:00
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 Qt5 backend
export MPLBACKEND="Qt5Agg"
Accepting request 1165670 from home:bnavigator:branches:devel:languages:python:numeric - Update to 0.10.0 * Multivariable interconnect functionality by @murrayrm in #881 * Remove NumPy matrix class by @murrayrm in #913 * I/O system class restructuring by @murrayrm in #916 * Documentation fixes by @KybernetikJo in #919, #921, #922, #923 * Add two MRAC siso examples by @KybernetikJo in #914 * Time response plots by @murrayrm in #920 * Print a connection table for interconnected systems by @sawyerbfuller in #925 * Update frequency response plots to use _response/_plot pattern by @murrayrm in #924 * create_statefbk_iosystem and optimal control enhancements by @murrayrm in #930 * Add unit test illustrating issue #935 + add method keyword for tf2ss by @murrayrm in #937 * Vectorize optimal control cost calculation by @urpok23 in #940 * Improved speed of ctrb and obsv functions by @Jpickard1 in #941 * Fix sphinx bug (erroneous use of class template) by @murrayrm in #943 * Fix bug in matched transformation + address other issues in #950 by @murrayrm in #951 * Fix typo in header of Hinf example by @jrforbes in #946 * Fix typo in stochresp.py by @alex-damjanovic in #945 * Fix TimeResponseData.to_pandas() to handle zero state case by @murrayrm in #958 * Update pole/zero and root locus plots to use _map/_plot pattern by @murrayrm in #953 * Fix CI warnings by @murrayrm in #955 * Support Python 3.12, bump minimum support according to SPEC 0 by @bnavigator in #961 OBS-URL: https://build.opensuse.org/request/show/1165670 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-control?expand=0&rev=49
2024-04-05 14:50:56 +00:00
# precision issues
donttest="test_lti_nlsys_response"
# 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