10
0

Accepting request 1244373 from home:badshah400:branches:science

* Update to version 8.0.1.
* Re-enable all tests as they have been fixed upstream.
* Bump numpy requirement to allow numpy >= 2 in keeping with upstream.
* Update minimum versions in Requires and BuildRequires.
* Restore tests that now work: test_home_page, test_gudermannian, test_image.
* Drop python-Mathics-sympy1_13.patch: incorporated upstream.

OBS-URL: https://build.opensuse.org/request/show/1244373
OBS-URL: https://build.opensuse.org/package/show/science/python-Mathics?expand=0&rev=47
This commit is contained in:
2025-02-09 17:25:23 +00:00
committed by Git OBS Bridge
parent cc9519efd8
commit bded601aa7
5 changed files with 54 additions and 256 deletions

View File

@@ -28,60 +28,59 @@
%define skip_python313 1
%define pyname Mathics3
%define src_ver 8.0.1
Name: python-Mathics%{psuffix}
Version: 7.0.0
Version: 8.0.1
Release: 0
Summary: A general-purpose computer algebra system
# Mathics itself is licensed as GPL-3.0 but it includes third-party software with MIT, BSD-3-Clause, and Apache-2.0 Licensing; also includes data from wikipedia licensed under CC-BY-SA-3.0 and GFDL-1.3
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-FIX-UPSTREAM python-Mathics-sympy1_13.patch badshah400@gmail.com -- Add compatibility for tests against sympy >= 1.13
Patch0: python-Mathics-sympy1_13.patch
BuildRequires: %{python_module Django >= 1.8}
BuildRequires: %{python_module Mathics-Scanner >= 1.4.1}
BuildRequires: %{python_module colorama}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module mpmath >= 0.19}
BuildRequires: %{python_module numpy < 2}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pexpect}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module sympy >= 1.10.1}
BuildRequires: %{python_module sympy >= 1.13.0}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Mathics-Scanner >= 1.3.0
Requires: python-Mathics-Scanner >= 1.4.1
Requires: python-Pint
Requires: python-llvmlite
Requires: python-Pympler
Requires: python-mpmath >= 0.19
Requires: python-numpy < 2
Requires: python-numpy
Requires: python-palettable
Requires: python-python-dateutil
Requires: python-requests
Requires: python-sympy >= 1.10.1
Requires: python-scipy
Requires: python-stopit
Requires: python-sympy >= 1.13.0
Requires: (python-Pillow >= 9.2 if python-base >= 3.7)
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: python-scikit-image >= 0.17
BuildArch: noarch
%if %{with test}
# SECTION For tests
BuildRequires: %{python_module Mathics = %{version}}
BuildRequires: %{python_module Mathics-Scanner >= 1.3.0}
BuildRequires: %{python_module Pillow >= 9.2 if %python-base >= 3.7}
BuildRequires: %{python_module Pint}
BuildRequires: %{python_module chardet}
BuildRequires: %{python_module llvmlite}
BuildRequires: %{python_module palettable}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module scikit-image >= 0.17}
BuildRequires: %{python_module stopit}
BuildRequires: %{python_module testsuite}
BuildRequires: %{python_module typing-extensions}
# /SECTION
%endif
Provides: python-Mathics3 = %{version}
BuildArch: noarch
%python_subpackages
%description
@@ -89,7 +88,7 @@ Mathics is a general-purpose computer algebra system (CAS). It is meant to be a
free, lightweight alternative to Mathematica.
%prep
%autosetup -p1 -n %{pyname}-%{version}
%autosetup -p1 -n mathics3-%{version}
# REMOVE SHEBANGS FROM FILES INSTALLED TO NON-EXEC LOCATIONS
pushd mathics
@@ -99,6 +98,9 @@ do
done
popd
# Unnecessary exec perms
chmod -x ./mathics/Packages/Rubi/Show{StepFormatting,StepRoutines}.m
%build
%if %{without test}
export USE_CYTHON=0
@@ -115,21 +117,9 @@ export USE_CYTHON=0
%if %{with test}
%check
PYTHONPATH+=:${PWD}
# test_gudermannian needs network access
# test_image: https://github.com/Mathics3/mathics-core/issues/837
DONTTEST='test_gudermannian or test_image'
# A whole swathe of tests no longer work: https://github.com/Mathics3/mathics-core/issues/1346
DONTTEST+=' or test_element or test_limit or test_private_doctests_'
DONTTEST+=' or test_associations_private_doctests or test_ArcCos or test_add'
DONTTEST+=' or test_set_and_clear or test_compare_many_members or test_cmp1_no_pass'
DONTTEST+=' or test_makeboxes_ or test_returncode or test_predicates_private_doctests'
if [ "%_lib" = "lib" ]; then
DONTTEST+=' or test_nintegrate or test_cli'
fi
export DONTTEST
export MATHICS_CHARACTER_ENCODING="ASCII"
export USE_CYTHON=0
%pytest -k "not (${DONTTEST})"
%pytest ./test
%endif
%if %{without test}