commit f8bbeee8db38994aff8e666683bee3154471ab0798122d4620392a13710d7d89 Author: Tomáš Chvátal Date: Tue Jul 2 11:50:28 2019 +0000 Accepting request 712262 from home:bnavigator A package for analysis and design of feedback control systems OBS-URL: https://build.opensuse.org/request/show/712262 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-control?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..37a8eaa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,24 @@ +*.changes merge=merge-changes +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b731c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.obscpio +*.osc +_build.* +.pbuild diff --git a/control-0.8.2.tar.gz b/control-0.8.2.tar.gz new file mode 100644 index 0000000..042838f --- /dev/null +++ b/control-0.8.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:726e8c36a253a54c8886df31f860d740d70de4f8b041421d5df078c3bff3aadb +size 182584 diff --git a/python-control-fixtestaugw.patch b/python-control-fixtestaugw.patch new file mode 100644 index 0000000..ec16daa --- /dev/null +++ b/python-control-fixtestaugw.patch @@ -0,0 +1,28 @@ +diff --git a/control/tests/robust_test.py b/control/tests/robust_test.py +index 9a3419f..b23f06c 100644 +--- a/control/tests/robust_test.py ++++ b/control/tests/robust_test.py +@@ -245,7 +245,7 @@ class TestAugw(unittest.TestCase): + @unittest.skipIf(not slycot_check(), "slycot not installed") + def testMimoW123(self): + """MIMO plant with all weights""" +- from control import augw, ss, append ++ from control import augw, ss, append, minreal + g = ss([[-1., -2], [-3, -4]], + [[1., 0.], [0., 1.]], + [[1., 0.], [0., 1.]], +@@ -295,10 +295,10 @@ class TestAugw(unittest.TestCase): + self.siso_almost_equal(w2[1, 1], p[3, 3]) + # u->z3 should be w3*g + w3g = w3 * g; +- self.siso_almost_equal(w3g[0, 0], p[4, 2]) +- self.siso_almost_equal(w3g[0, 1], p[4, 3]) +- self.siso_almost_equal(w3g[1, 0], p[5, 2]) +- self.siso_almost_equal(w3g[1, 1], p[5, 3]) ++ self.siso_almost_equal(w3g[0, 0], minreal(p[4, 2])) ++ self.siso_almost_equal(w3g[0, 1], minreal(p[4, 3])) ++ self.siso_almost_equal(w3g[1, 0], minreal(p[5, 2])) ++ self.siso_almost_equal(w3g[1, 1], minreal(p[5, 3])) + # u->v should be -g + self.siso_almost_equal(-g[0, 0], p[6, 2]) + self.siso_almost_equal(-g[0, 1], p[6, 3]) diff --git a/python-control.changes b/python-control.changes new file mode 100644 index 0000000..aa5c3a7 --- /dev/null +++ b/python-control.changes @@ -0,0 +1,28 @@ +------------------------------------------------------------------- +Thu Jun 27 13:12:31 UTC 2019 - Benjamin Greiner + +- remove python-devel from BuildRequires + +------------------------------------------------------------------- +Tue Jun 25 15:41:59 UTC 2019 - Benjamin Greiner + +- add slycot to BuildRequires for tests + +------------------------------------------------------------------- +Wed Jun 19 12:48:24 UTC 2019 - Benjamin Greiner + +- switch to xvfb-run + +------------------------------------------------------------------- +Wed Jun 19 11:05:31 UTC 2019 - Benjamin Greiner + +make v0.8.2 spec test suite compliant +- specify Qt5Agg as Matplotlib backend +- add X11 to build system so that Qt5 tests pass +- reorganize spec file + +------------------------------------------------------------------- +Mon May 13 19:16:19 UTC 2019 - Benjamin Greiner + +update to version 0.8.2 +- diff --git a/python-control.spec b/python-control.spec new file mode 100644 index 0000000..50c54e0 --- /dev/null +++ b/python-control.spec @@ -0,0 +1,80 @@ +# +# spec file for package python-control +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# 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-%{**}} +Name: python-control +Version: 0.8.2 +Release: 0 +Summary: Python control systems library +License: BSD-3-Clause +Group: Development/Languages/Python +URL: http://python-control.sourceforge.net +Source: https://files.pythonhosted.org/packages/source/c/control/control-%{version}.tar.gz +Patch0: python-control-fixtestaugw.patch +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 nose} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module scipy} +BuildRequires: %{python_module slycot} +BuildRequires: libtcmalloc4 +BuildRequires: xvfb-run +# /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} +%patch0 -p1 + +%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 Qt5 backend in a virtual X server +# environment +export MPLBACKEND="Qt5Agg" +%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} +export LD_PRELOAD="%{_libdir}/libtcmalloc_minimal.so.4" +xvfb-run -a $python setup.py test +} + +%files %{python_files} +%doc ChangeLog README.rst +%license LICENSE +%{python_sitelib}/control +%{python_sitelib}/control-*-py*.egg-info + +%changelog