forked from pool/python-control
- update to modern python on sle15
* Small docstring fixes for release by @murrayrm in #832 - Update to version 0.9.1 - Update to version 0.8.4 * Improved default time vector for time response * New use_legacy_defaults function to allow compatibility * Allow creation of non-proper transfer functions (bnavigator, rlegnain) * Added ability to set arrow head length and width option * Added ability to 'prewarp' the conversion of continuous to * Added rlocus capability for discrete-time systems * Updated pzmap grid to be compatible with matplotlib updates * Implement loadable string representation (repr) for tf, ss, * Fixed margin computation for discrete time systems * Fixed InterconnectedSystem naming bugs, improved * Fixed LinearIOSystem output bug in output function * Fixed bug in forced_response that overrode squeeze * Use rad/sec for Bode plot in MATLAB bode (was erroneously * Removed deprecated scipy calls and updated to latest numpy * Updated unit tests + switch to pytest (bnavigator, * Return type for eigenvalues in lqe changed to 1D array - Skip a test family on Leap because of segfaults in numpy - moved Pillow requirement to matplotlib package - add pr430-numpy119delete.patch to fix test failures with new numpy - remove ppc workaround and matrix type during tests gh#python-control/python-control#423 - skip mixsyn test on PowerPC boo#1172555 duplicated array test - remove python-devel from BuildRequires - add slycot to BuildRequires for tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-control?expand=0&rev=56
This commit is contained in:
92
python-control.spec
Normal file
92
python-control.spec
Normal file
@@ -0,0 +1,92 @@
|
||||
#
|
||||
# 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/
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-control
|
||||
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
|
||||
BuildRequires: %{python_module base >= 3.8}
|
||||
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
|
||||
Requires: python-numpy
|
||||
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}
|
||||
BuildRequires: %{python_module pytest-timeout}
|
||||
BuildRequires: %{python_module pytest-xdist}
|
||||
BuildRequires: %{python_module pytest-xvfb}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module qt5}
|
||||
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
|
||||
%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 Qt5 backend
|
||||
export MPLBACKEND="Qt5Agg"
|
||||
# precision issues
|
||||
donttest="test_lti_nlsys_response"
|
||||
# flaky precision issues
|
||||
donttest="$donttest or test_response_plot_kwargs"
|
||||
# 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
|
||||
Reference in New Issue
Block a user