From 5df6a510d4964e4e0e49f1962ad04ecb3fcf3bc6727fb712fc96dc42da8b7e82 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 12 Jul 2024 07:14:15 +0000 Subject: [PATCH] - Restrict numpy to < 2. - Switch to pyproject macros. - No more globs in %files. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-cma?expand=0&rev=12 --- .gitattributes | 23 ++++++++++++++++ .gitignore | 1 + cma-3.3.0.tar.gz | 3 +++ python-cma.changes | 45 ++++++++++++++++++++++++++++++++ python-cma.spec | 65 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 137 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 cma-3.3.0.tar.gz create mode 100644 python-cma.changes create mode 100644 python-cma.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.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 +*.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..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/cma-3.3.0.tar.gz b/cma-3.3.0.tar.gz new file mode 100644 index 0000000..17305dc --- /dev/null +++ b/cma-3.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a061296bfca4eb979ed471e0c5acf40fc69345c13d4522ac6ed62a50d864bcf +size 776265 diff --git a/python-cma.changes b/python-cma.changes new file mode 100644 index 0000000..9ee3d7d --- /dev/null +++ b/python-cma.changes @@ -0,0 +1,45 @@ +------------------------------------------------------------------- +Fri Jul 12 07:13:44 UTC 2024 - Steve Kowalik + +- Restrict numpy to < 2. +- Switch to pyproject macros. +- No more globs in %files. + +------------------------------------------------------------------- +Sat Jan 28 14:35:51 UTC 2023 - Dirk Müller + +- update to 3.3.0: + * Diagonal decoding, fmin functions with surrogate and more. + +------------------------------------------------------------------- +Wed Jan 4 16:50:24 UTC 2023 - Dirk Müller + +- update to r3.2.2: + * Smallish fixes and improvements and a constraints use case notebook. + * fixes plot of principal axes which were shown squared by mistake +- update to r3.2.0: + * constraints handling via a dynamic unconstrained function instantiated + from cma.ConstrainedFitnessAL. + * many small improvements and fixes +- update to r3.1.0: + * fix return value of fmin_con and make it more usable, added attribute + best_feasible + * polish evolution_strategy.py + * fix a few smallish bugs + +------------------------------------------------------------------- +Fri Apr 16 11:30:57 UTC 2021 - Steve Kowalik + +- Don't build for Python 3.6, due to no NumPy. + +------------------------------------------------------------------- +Wed May 13 07:12:57 UTC 2020 - Tomáš Chvátal + +- Add missing runtime dependencies, as declared in setup.py +- Format with spec-cleaner +- Make sure the tests are executed + +------------------------------------------------------------------- +Mon May 11 18:45:35 UTC 2020 - Christoph Junghans + +- inital commit adding version 3.0.3 diff --git a/python-cma.spec b/python-cma.spec new file mode 100644 index 0000000..c2bdb89 --- /dev/null +++ b/python-cma.spec @@ -0,0 +1,65 @@ +# +# spec file for package python-cma +# +# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2020 Christoph Junghans +# +# 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-cma +Version: 3.3.0 +Release: 0 +Summary: Covariance Matrix Adaptation Evolution Strategy numerical optimizer +License: BSD-3-Clause +URL: https://cma.gforge.inria.fr/cmaes_sourcecode_page.html +Source0: https://github.com/CMA-ES/pycma/archive/r%{version}.tar.gz#/cma-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module numpy-devel < 2} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-numpy < 2 +Recommends: python-matplotlib +BuildArch: noarch +%python_subpackages + +%description +A stochastic numerical optimization algorithm for difficult +(non-convex, ill-conditioned, multi-modal, rugged, noisy) optimization +problems in continuous search spaces, implemented in Python. + +%prep +%autosetup -n pycma-r%{version} +#Remove unneeded shebang +sed -i '1d' cma/{bbobbenchmarks.py,purecma.py,test.py} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m cma.test + +%files %{python_files} +%license LICENSE +%doc README.md +%{python_sitelib}/cma +%{python_sitelib}/cma-%{version}.dist-info + +%changelog