Accepting request 1242224 from home:badshah400:Staging
* Update to version 7.0.0. * Disable whole swathe of failing tests (gh#Mathics3/mathics-core#1346). * Add python-Mathics-sympy1_13.patch -- Add compatibility for tests against sympy >= 1.13 (upstream commits). * Switch to pyproject_* macros for build. * Require numpy < 2 as numpy2 is not supported yet. * BuildArch: noarch as there are no arch dependent binaries in package. * Enable Python 3.11, 3.12. * Disable Python 3.13. * Drop old compatibility macro redefinition. OBS-URL: https://build.opensuse.org/request/show/1242224 OBS-URL: https://build.opensuse.org/package/show/science/python-Mathics?expand=0&rev=42
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-Mathics
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -26,52 +26,47 @@
|
||||
%define psuffix %{nil}
|
||||
%endif
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
# Upstream no longer supports python2
|
||||
%define skip_python2 1
|
||||
# https://github.com/Mathics3/mathics-core/issues/743
|
||||
%define skip_python311 1
|
||||
# https://github.com/Mathics3/mathics-core/issues/932
|
||||
%define skip_python312 1
|
||||
%define skip_python313 1
|
||||
%define pyname Mathics3
|
||||
Name: python-Mathics%{psuffix}
|
||||
Version: 6.0.4
|
||||
Version: 7.0.0
|
||||
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-FEATURE-OPENSUSE python-Mathics-relax-numpy-versions.patch badshah400@gmail.com -- Drop upper limit on required numpy version
|
||||
Patch0: python-Mathics-relax-numpy-versions.patch
|
||||
# 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 colorama}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module mpmath >= 0.19}
|
||||
BuildRequires: %{python_module numpy}
|
||||
BuildRequires: %{python_module numpy < 2}
|
||||
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 wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-Django >= 1.8
|
||||
Requires: python-Mathics-Scanner >= 1.3.0
|
||||
Requires: python-Pint
|
||||
Requires: python-llvmlite
|
||||
Requires: python-mpmath >= 0.19
|
||||
Requires: python-numpy
|
||||
Requires: python-numpy < 2
|
||||
Requires: python-palettable
|
||||
Requires: python-python-dateutil
|
||||
Requires: python-requests
|
||||
Requires: python-sympy >= 1.10.1
|
||||
Requires: (python-Pillow >= 9.2 if python-base >= 3.7)
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Recommends: python-scikit-image >= 0.17
|
||||
%if %{with test}
|
||||
# SECTION For tests
|
||||
BuildRequires: %{python_module Mathics}
|
||||
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}
|
||||
@@ -86,6 +81,7 @@ BuildRequires: %{python_module typing-extensions}
|
||||
# /SECTION
|
||||
%endif
|
||||
Provides: python-Mathics3 = %{version}
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -106,23 +102,34 @@ popd
|
||||
%build
|
||||
%if %{without test}
|
||||
export USE_CYTHON=0
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if %{without test}
|
||||
export USE_CYTHON=0
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/mathics
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%endif
|
||||
|
||||
%if %{with test}
|
||||
%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
|
||||
PYTHONPATH+=:${PWD}
|
||||
%pytest -k 'not (test_home_page or test_gudermannian or test_image)'
|
||||
# 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'
|
||||
# DONTTEST+=' or test_limit or or test_compare_many_members'
|
||||
# DONTTEST+=' or test_apply_fns_to_lists or test_bessel or test_string_replace_errors'
|
||||
# DONTTEST+=' or test_set_and_clear or test_predicates_private_doctests or test_ArcCos'
|
||||
export DONTTEST
|
||||
export USE_CYTHON=0
|
||||
%pytest -k "not (${DONTTEST})"
|
||||
%endif
|
||||
|
||||
%if %{without test}
|
||||
@@ -137,7 +144,7 @@ PYTHONPATH+=:${PWD}
|
||||
%doc README.rst AUTHORS.txt
|
||||
%python_alternative %{_bindir}/mathics
|
||||
%{python_sitelib}/mathics/
|
||||
%{python_sitelib}/%{pyname}-%{version}-py%{python_version}.egg-info/
|
||||
%{python_sitelib}/%{pyname}-%{version}*.*-info/
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user