From 785a13124d102d8db9aefa678e7cd410f219d844ad8e373c8ea402cd04f66c9c Mon Sep 17 00:00:00 2001 From: Atri Bhattacharya Date: Sun, 23 Jul 2023 13:10:03 +0000 Subject: [PATCH] Accepting request 1099526 from home:badshah400:branches:science Add python-Mathics-relax-module-versions.patch: relax sympy and numpy upper limits on requirements as the otherwise unsupported sympy 1.12 and numpy 1.24.2 are in Tumbleweed. OBS-URL: https://build.opensuse.org/request/show/1099526 OBS-URL: https://build.opensuse.org/package/show/science/python-Mathics?expand=0&rev=30 --- python-Mathics-relax-module-versions.patch | 30 ++++++++++++++++++++++ python-Mathics.changes | 3 +++ python-Mathics.spec | 10 +++++--- 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 python-Mathics-relax-module-versions.patch diff --git a/python-Mathics-relax-module-versions.patch b/python-Mathics-relax-module-versions.patch new file mode 100644 index 0000000..a193783 --- /dev/null +++ b/python-Mathics-relax-module-versions.patch @@ -0,0 +1,30 @@ +Index: Mathics3-6.0.1/setup.py +=================================================================== +--- Mathics3-6.0.1.orig/setup.py ++++ Mathics3-6.0.1/setup.py +@@ -64,9 +64,9 @@ elif sys.version_info[:2] == (3, 6): + sys.exit(-1) + else: + INSTALL_REQUIRES += [ +- "numpy<=1.24", ++ "numpy", + "llvmlite", +- "sympy>=1.8, < 1.12", ++ "sympy>=1.8", + "pillow >= 9.2", + ] + +Index: Mathics3-6.0.1/Mathics3.egg-info/requires.txt +=================================================================== +--- Mathics3-6.0.1.orig/Mathics3.egg-info/requires.txt ++++ Mathics3-6.0.1/Mathics3.egg-info/requires.txt +@@ -1,7 +1,7 @@ + Mathics-Scanner>=1.3.0 +-numpy<=1.24 ++numpy + llvmlite +-sympy<1.12,>=1.8 ++sympy>=1.8 + pillow>=9.2 + mpmath>=1.2.0 + palettable diff --git a/python-Mathics.changes b/python-Mathics.changes index 876e219..ab2ab52 100644 --- a/python-Mathics.changes +++ b/python-Mathics.changes @@ -5,6 +5,9 @@ Tue Apr 11 07:11:25 UTC 2023 - Atri Bhattacharya python-scipy. - Add necessary Requires: python-requests, python-Cython, python-Pillow. +- Add python-Mathics-relax-module-versions.patch: relax sympy and + numpy upper limits on requirements as the otherwise unsupported + sympy 1.12 and numpy 1.24.2 are in Tumbleweed. ------------------------------------------------------------------- Tue Mar 14 10:37:24 UTC 2023 - Atri Bhattacharya diff --git a/python-Mathics.spec b/python-Mathics.spec index 08cb9d6..33a2916 100644 --- a/python-Mathics.spec +++ b/python-Mathics.spec @@ -39,6 +39,8 @@ Summary: A general-purpose computer algebra system License: Apache-2.0 AND BSD-3-Clause AND GPL-3.0-only AND MIT URL: https://mathics.github.io/ Source0: https://github.com/Mathics3/mathics-core/releases/download/%{version}/%{pyname}-%{version}.tar.gz +# PATCH-FEATURE-OPENSUSE python-Mathics-relax-module-versions.patch gh#mathics-core/issues#881 badshah400@gmail.com -- Relax upper limits on sympy and numpy to get packages building for Tumbleweed +Patch0: python-Mathics-relax-module-versions.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module Django >= 1.8} BuildRequires: %{python_module colorama} @@ -65,6 +67,7 @@ Requires: python-sympy >= 1.10.1 Requires: (python-Pillow >= 9.2 if python-base >= 3.7) Requires(post): update-alternatives Requires(postun):update-alternatives +Recommends: python-scikit-image >= 0.17 %if %{with test} # SECTION For tests BuildRequires: %{python_module Mathics} @@ -76,6 +79,7 @@ BuildRequires: %{python_module llvmlite} BuildRequires: %{python_module palettable} BuildRequires: %{python_module pytest} BuildRequires: %{python_module requests} +BuildRequires: %{python_module scikit-image >= 0.17} # /SECTION %endif Provides: python-Mathics3 = %{version} @@ -95,9 +99,6 @@ do done popd -# Fix incorrect required version for numpy in egg-info -sed -i "s/numpy<=1.24/numpy<1.25/" setup.py Mathics3.egg-info/requires.txt - %build %if %{without test} export USE_CYTHON=1 @@ -116,7 +117,8 @@ export USE_CYTHON=1 %check # Home page tests require django server up and running, test_gudermannian needs network access # test_image: https://github.com/Mathics3/mathics-core/issues/837 -%pytest_arch -k 'not (test_home_page or test_gudermannian or test_image)' +# test_calculus: https://github.com/Mathics3/mathics-core/issues/881 +%pytest_arch -k 'not (test_home_page or test_gudermannian or test_image or test_calculus)' %endif %if %{without test}