1
0
Files
python-control/python-control.spec

89 lines
2.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-control
#
# Copyright (c) 2020 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
# SciPy 1.6.0 dropped Python 3.6
%define skip_python36 1
Name: python-control
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
Version: 0.8.4
Release: 0
Summary: Python control systems library
License: BSD-3-Clause
URL: http://python-control.sourceforge.net
Source: https://files.pythonhosted.org/packages/source/c/control/control-%{version}.tar.gz
Source1: %{name}-rpmlintrc
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-matplotlib
Requires: python-numpy
Requires: python-scipy
Recommends: python-slycot
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module matplotlib-qt5}
BuildRequires: %{python_module matplotlib}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest-xvfb}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module scipy}
BuildRequires: %{python_module slycot}
BuildRequires: libjemalloc2
# /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
%setup -q -n control-%{version}
%autopatch -p1
#remove shebang
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
%python_build
%install
%python_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 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
# preload malloc library to avoid free() error on i586 architecture
if [[ $(getconf LONG_BIT) == 32 ]]; then
export LD_PRELOAD="%{_libdir}/libjemalloc.so.2"
fi
%if 0%{?suse_version} < 1550
# segfault: free() error in Leap numpy library
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
%define donttest -k "not (test_clean_part or test_pzmap)"
%endif
%pytest %{?donttest}
%files %{python_files}
%doc ChangeLog README.rst
%license LICENSE
%{python_sitelib}/control
%{python_sitelib}/control-%{version}-py*.egg-info
%changelog