2018-06-02 12:03:49 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-gmpy2
|
|
|
|
#
|
2024-01-25 02:42:28 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2018-06-02 12:03:49 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2022-02-21 17:46:39 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-06-02 12:03:49 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-06-11 13:43:55 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2018-06-02 12:03:49 +02:00
|
|
|
Name: python-gmpy2
|
2023-01-05 22:06:11 +01:00
|
|
|
Version: 2.1.5
|
2018-06-02 12:03:49 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3x
|
2022-02-21 17:46:39 +01:00
|
|
|
License: LGPL-3.0-only
|
|
|
|
URL: https://github.com/aleaxit/gmpy
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/g/gmpy2/gmpy2-%{version}.tar.gz
|
2023-09-19 16:34:13 +02:00
|
|
|
# PATCH-FIX-UPSTREAM https://github.com/aleaxit/gmpy/pull/422 Update MPFR to 4.2.1 in build scripts & fix test failures on new version
|
2023-09-28 09:41:25 +02:00
|
|
|
Patch0: mpfr421.patch
|
2023-09-19 16:34:13 +02:00
|
|
|
# PATCH-FIX-UPSTREAM file included in https://github.com/aleaxit/gmpy/issues/418#issuecomment-1706721394
|
2023-09-28 09:41:25 +02:00
|
|
|
Patch1: gmpy2_cache.c.diff
|
2024-01-25 02:42:28 +01:00
|
|
|
# PATCH-FIX-UPSTREAM included in https://github.com/aleaxit/gmpy/issues/446
|
|
|
|
Patch2: support-python-312.patch
|
2018-06-02 12:03:49 +02:00
|
|
|
BuildRequires: %{python_module devel}
|
2024-01-25 02:42:28 +01:00
|
|
|
BuildRequires: %{python_module pip}
|
2018-06-02 12:03:49 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2024-01-25 02:42:28 +01:00
|
|
|
BuildRequires: %{python_module wheel}
|
2018-06-02 12:03:49 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: gmp-devel
|
|
|
|
BuildRequires: mpc-devel
|
|
|
|
BuildRequires: mpfr-devel
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
gmpy2 is a C-coded Python extension module that supports
|
|
|
|
multiple-precision arithmetic. In addition to supporting
|
|
|
|
GMP or MPIR for multiple-precision integer and rational
|
|
|
|
arithmetic, gmpy2 adds support for the MPFR (correctly
|
|
|
|
rounded real floating-point arithmetic) and MPC (correctly
|
|
|
|
rounded complex floating-point arithmetic) libraries.
|
|
|
|
|
|
|
|
%prep
|
2023-09-19 16:34:13 +02:00
|
|
|
%autosetup -p1 -n gmpy2-%{version}
|
2018-06-02 12:03:49 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
export CFLAGS="%{optflags}"
|
2024-01-25 02:42:28 +01:00
|
|
|
%pyproject_wheel
|
2018-06-02 12:03:49 +02:00
|
|
|
|
|
|
|
%install
|
2024-01-25 02:42:28 +01:00
|
|
|
%pyproject_install
|
2018-06-02 12:03:49 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
|
|
|
|
%check
|
|
|
|
%{python_expand export PYTHONDONTWRITEBYTECODE=1
|
|
|
|
export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
|
|
|
pushd test
|
|
|
|
$python runtests.py
|
|
|
|
popd
|
|
|
|
}
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc README
|
|
|
|
%license COPYING COPYING.LESSER
|
2023-09-19 16:34:13 +02:00
|
|
|
%{python_sitearch}/gmpy2
|
2024-01-25 02:42:28 +01:00
|
|
|
%{python_sitearch}/gmpy2-%{version}.dist-info
|
2018-06-02 12:03:49 +02:00
|
|
|
|
|
|
|
%changelog
|