The package rpms/python-cyipopt.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/python-cyipopt.git/commit/?id=348....
Change:
+%ifarch x86_64
Thanks.
Full change:
============
commit 348c3052abd43c277ca8d75d5e98075fd3081d5b
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Sat Nov 4 09:35:22 2023 -0400
Update to 1.3.0 (close RHBZ#2240348)
diff --git a/.gitignore b/.gitignore
index f2483e1..3e0173a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/cyipopt-1.1.0.tar.gz
/cyipopt-1.2.0.tar.gz
+/cyipopt-1.3.0.tar.gz
diff --git a/191.patch b/191.patch
deleted file mode 100644
index 215fc1e..0000000
--- a/191.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 02aa4390b33d46cc5e7676b860ad96daa620a0f0 Mon Sep 17 00:00:00 2001
-From: "Benjamin A. Beasley" <code(a)musicinmybrain.net>
-Date: Wed, 8 Mar 2023 09:22:27 -0500
-Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20use=20deprecated/removed=20np.f?=
- =?UTF-8?q?loat=20alias?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-In examples/lasso.py, change np.float (which was deprecated in numpy
-1.20 and removed in numpy 1.24) to np.float64.
----
- examples/lasso.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/examples/lasso.py b/examples/lasso.py
-index 995bc1d..e1ffa31 100644
---- a/examples/lasso.py
-+++ b/examples/lasso.py
-@@ -142,7 +142,7 @@ def hessian(self, x, lagrange, obj_factor):
- #
- n = 100
- e = 1
-- beta = np.array((0, 0, 2, -4, 0, 0, -1, 3), dtype=np.float).reshape((-1, 1))
-+ beta = np.array((0, 0, 2, -4, 0, 0, -1, 3), dtype=np.float64).reshape((-1, 1))
-
- #
- # Set the random number generator seed.
diff --git a/cyipopt-1.1.0-no-runtime-cython-setuptools.patch
b/cyipopt-1.1.0-no-runtime-cython-setuptools.patch
deleted file mode 100644
index bd2fe69..0000000
--- a/cyipopt-1.1.0-no-runtime-cython-setuptools.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -Naur cyipopt-1.1.0-original/setup.py cyipopt-1.1.0/setup.py
---- cyipopt-1.1.0-original/setup.py 2023-07-23 09:38:54.173691369 -0400
-+++ cyipopt-1.1.0/setup.py 2023-07-23 09:39:26.788141133 -0400
-@@ -48,9 +48,7 @@
- EMAIL = "moorepants(a)gmail.com"
- URL = "https://github.com/mechmotum/cyipopt"
- INSTALL_REQUIRES = [
-- "cython>=0.26",
- "numpy>=1.15",
-- "setuptools>=39.0",
- ]
- LICENSE = "EPL-1.0"
- CLASSIFIERS = [
diff --git a/python-cyipopt.spec b/python-cyipopt.spec
index 147b2ae..54bdf85 100644
--- a/python-cyipopt.spec
+++ b/python-cyipopt.spec
@@ -5,49 +5,36 @@
%bcond doc_pdf 1
Name: python-cyipopt
-Version: 1.2.0
+Version: 1.3.0
Release: %autorelease
Summary: Cython interface for the interior point optimizer IPOPT
-# SPDX
-License: EPL-1.0
+# The entire source is EPL-2.0, except:
+#
+# BSD-3-Clause:
+# - cyipopt/tests/unit/test_scipy_ipopt_from_scipy.py
+#
+# Note that the licenses in licenses_manylinux_bundled_libraries/ do not apply
+# because this package does not bundle dependencies as the PyPI wheels do.
+License: EPL-2.0 AND BSD-3-Clause
URL:
https://github.com/mechmotum/cyipopt
# We prefer the GitHub source archive to the PyPI one because it contains
# the examples.
Source: %{url}/archive/v%{version}/cyipopt-%{version}.tar.gz
-# Don’t use deprecated/removed np.float alias
-#
https://github.com/mechmotum/cyipopt/pull/191
-Patch: %{url}/pull/191.patch
-
-# Downstream-only: drop Cython and setuptools from install_requires
-#
-# Upstream wants to keep these “setup” dependencies in install_requires to
-# support “setup.py install”:
-#
-#
https://github.com/mechmotum/cyipopt/commit/5088cfc081ecf2da73fbf6ab8b64e...
-#
-# However, they are only imported from setup.py, so we patch them out to
-# avoid bringing them in as runtime dependencies for the RPM.
-Patch: cyipopt-1.1.0-no-runtime-cython-setuptools.patch
-
#
https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
BuildRequires: python3-devel
-# setup_requires:
-BuildRequires: python3dist(cython) >= 0.26
-BuildRequires: python3dist(numpy) >= 1.15
-
-BuildRequires: pkgconfig(ipopt)
+BuildRequires: pkgconfig(ipopt) >= 3.12
# Called from setup.py:
BuildRequires: /usr/bin/pkg-config
BuildRequires: python3dist(pytest)
# Scipy is an optional dependency. Installing it allows testing the scipy
# integration.
-BuildRequires: python3dist(scipy)
+BuildRequires: python3dist(scipy) >= 1.8
BuildRequires: gcc
@@ -97,6 +84,10 @@ BuildArch: noarch
%prep
%autosetup -n cyipopt-%{version} -p1
+# PyPI wheels need to be built against an old version of numpy for
+# compatibility, but we just need whatever is in the distrubtion.
+sed -r -i 's/"oldest-supported-(numpy)"/"\1"/'
pyproject.toml
+
# Replace zero-length files in the tests with proper empty text files, i.e.,
# just a newline. It makes sense for __init__.py files to be empty, but the
# empty test files look like a mistake, so an upstream issue was filed:
@@ -134,7 +125,19 @@ PYTHONPATH="${BLIB}" %make_build -C docs latex \
%check
-%pytest
+%ifarch ppc64le s390x
+# Arch-dependent failures of test_minimize_ipopt_jac_with_scipy_methods[cobyla]
+#
https://github.com/mechmotum/cyipopt/issues/237
+k="${k-}${k+ and }not test_minimize_ipopt_jac_with_scipy_methods[cobyla]"
+%endif
+%ifarch x86_64
+# Flaky failure of TestSLSQP::test_minimize_unbounded_approximated on x86_64
+#
https://github.com/mechmotum/cyipopt/issues/238
+k="${k-}${k+ and }not (TestSLSQP and test_minimize_unbounded_approximated)"
+%endif
+
+%pytest -v -rsx -k "${k-}"
+
# Run the examples for additional confidence.
while read -r example
do
diff --git a/sources b/sources
index 272a8dd..8b48c0b 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (cyipopt-1.2.0.tar.gz) =
e4e16936f5cf809d601a68af31de6f12007040f9b8cc21d3330068bc704e51a525d2f0a095d00330a9bc2782813a07d88a332bdf7e86e799dd24cd866e8ea7e1
+SHA512 (cyipopt-1.3.0.tar.gz) =
6cf45f266486b57029ba68ee8f995ea45df02023b3efa2b5a26ff9858fad1b774551a406c0436c67ebb667ea1117faed8f08fe06bf64905fe4f7ae258675b49d
commit 8cdd72562abb9c60f632f1e25a835a9724755e0c
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Oct 11 17:51:53 2023 -0400
Use %{py3_test_envvars} to run examples
diff --git a/python-cyipopt.spec b/python-cyipopt.spec
index 3b029de..147b2ae 100644
--- a/python-cyipopt.spec
+++ b/python-cyipopt.spec
@@ -138,7 +138,7 @@ PYTHONPATH="${BLIB}" %make_build -C docs latex \
# Run the examples for additional confidence.
while read -r example
do
- PYTHONPATH='%{buildroot}%{python3_sitearch}' '%{python3}'
"${example}"
+ %{py3_test_envvars} '%{python3}' "${example}"
done < <(
# Skip hs071_scipy_jax.py, since it requires
https://pypi.org/project/jax/,
# which is not packaged.