SHA256
1
0
forked from pool/python-sympy
Files
python-sympy/python-sympy.spec
Dirk Mueller 3bee1479a4 - update to 1.12.1:
* improved compatibility with NumPy 2.0 and CPython 3.12
  * https://github.com/sympy/sympy/wiki/release-notes-for-1.12
  * There was a regression in 1.7 that meant that __slots__
    would not work correctly for Basic instances and they
    would end up having __dict__. This also made it possible
    to set arbitrary attributes on Basic instances such as
    symbols which breaks immutability. This was fixed in
    1.7.1 to ensure that Basic instances do not have
    __dict__ and it is not possible to set attributes on
  * Fixed lazy iteration of series with expr.series(x,
     n=None) which was broken in the 1.7 release. (#20589 by
     @oscarbenjamin and @sachin-4099)
  * Updated documentation for sympy.stats.sample for seed
  * sympy.stats.sample now has an optional seed argument.
  * Random failures with sympy.stats.sample have now been
  * Modules and names that were accidentally importable from
    sympy are no longer importable. In sympy 1.6 importing and
    using these names would give a deprecation warning. In
    sympy 1.7 these names are removed. As an example from
    sympy import add would need to be from sympy.core import
    add or import sympy.core.add as add. (#19554 by
  * DEPRECATION: Using non-Expr args in Add, Mul or Pow is
  * Manifold.patches attribute is deprecated. (#19368 by
  * Patch.coord_systems attribute is deprecated. (#19368 by
  * Class signature names of CoordSystem is deprecated.
    CoordinateSymbol class and CoordSystem.symbols attribute are
  * CoordSystem.transforms, CoordSystem.connect_to, and
    CoordSystem.coord_tuple_transform_to are deprecated. Class
    signature relations, CoordSystem.transformation and

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sympy?expand=0&rev=31
2024-06-29 05:41:35 +00:00

111 lines
4.0 KiB
RPMSpec
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#
# spec file for package python-sympy
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
%{?sle15_python_module_pythons}
# Tests run 7h53m47s in OBS ... so we are switching them off right now
%bcond_with test
Name: python-sympy
Version: 1.12.1
Release: 0
Summary: Computer algebra system (CAS) in Python
License: BSD-3-Clause
Group: Development/Libraries/Python
URL: https://www.sympy.org/
Source0: https://files.pythonhosted.org/packages/source/s/sympy/sympy-%{version}.tar.gz
Source99: python-sympy-rpmlintrc
BuildRequires: %{python_module mpmath >= 1.1.0 with %python-mpmath < 1.4.0}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-mpmath >= 1.1.0
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: python-ipython
Recommends: python-numpy
Recommends: python-symengine
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module pytest}
%endif
%python_subpackages
%description
SymPy is a Python library for symbolic mathematics. It aims to become
a full-featured computer algebra system (CAS) while keeping the code
as simple as possible in order to be comprehensible and easily
extensible. SymPy is written entirely in Python and does not require
any external libraries.
%prep
%autosetup -p1 -n sympy-%{version}
sed -i -e '/^#!\//, 1d' sympy/testing/tests/diagnose_imports.py
%{python_expand cp -r examples examples-%{$python_bin_suffix}
find examples-%{$python_bin_suffix} -name "*.py" -exec sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" {} \;
find examples-%{$python_bin_suffix} -name "*.py" -exec sed -i "s|^#! %{_bindir}/env python$|#!%{__$python}|" {} \;
}
%build
%python_build
%install
%python_install
%{python_expand chmod a+x %{buildroot}%{$python_sitelib}/sympy/physics/mechanics/models.py
chmod a+x %{buildroot}%{$python_sitelib}/sympy/physics/optics/polarization.py
chmod a+x %{buildroot}%{$python_sitelib}/sympy/benchmarks/bench_symbench.py
sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" %{buildroot}%{$python_sitelib}/sympy/physics/mechanics/models.py
sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" %{buildroot}%{$python_sitelib}/sympy/physics/optics/polarization.py
sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" %{buildroot}%{$python_sitelib}/sympy/benchmarks/bench_symbench.py
}
%{python_compileall}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/isympy
%python_clone -a %{buildroot}%{_mandir}/man1/isympy.1
%post
%{python_install_alternative isympy isympy.1%{ext_man} }
%postun
%python_uninstall_alternative isympy
%if %{with test}
%check
# Dont even dare to think that the pytest macro could manage
# all complexities hidden in that specific command!
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} PYTHONDONTWRITEBYTECODE=1
$python -c 'from sympy.testing import runtests ; runtests.run_all_tests()'
}
%endif
%files %{python_files}
%license LICENSE
%doc AUTHORS README.md
%doc examples-%{python_bin_suffix}/
%python_alternative %{_bindir}/isympy
%python_alternative %{_mandir}/man1/isympy.1%{ext_man}
%{python_sitelib}/sympy
%{python_sitelib}/isympy.py*
%{python_sitelib}/sympy-%{version}-py*.egg-info
%pycache_only %{python_sitelib}/__pycache__/isympy*.py*
%changelog