Compare commits
2 Commits
rawhide
...
main-riscv
Author | SHA1 | Date | |
---|---|---|---|
75e4e88733 | |||
a99e7723ca |
19
pr-422.patch
Normal file
19
pr-422.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff --git a/src/gmpy2_format.c b/src/gmpy2_format.c
|
||||
index 2870f44..3c876d7 100644
|
||||
--- a/src/gmpy2_format.c
|
||||
+++ b/src/gmpy2_format.c
|
||||
@@ -592,12 +592,14 @@ GMPy_MPC_Format(PyObject *self, PyObject *args)
|
||||
if (mpcstyle)
|
||||
strcat(tempbuf, " ");
|
||||
else {
|
||||
+#if MPFR_VERSION < MPFR_VERSION_NUM(4,2,1)
|
||||
/* Need to insert + if imag is nan or +inf. */
|
||||
if (mpfr_nan_p(mpc_imagref(MPC(self))) ||
|
||||
(mpfr_inf_p(mpc_imagref(MPC(self))) &&
|
||||
mpfr_sgn(mpc_imagref(MPC(self))) > 0)) {
|
||||
strcat(tempbuf, "+");
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
strcat(tempbuf, imagbuf);
|
||||
if (strlen(imagbuf) < 50 &&
|
@ -1,6 +1,6 @@
|
||||
Name: python-gmpy2
|
||||
Version: 2.1.5
|
||||
Release: 4%{?dist}
|
||||
Release: 4.1.riscv64%{?dist}
|
||||
Summary: Python interface to GMP, MPFR, and MPC
|
||||
|
||||
License: LGPL-3.0-or-later
|
||||
@ -12,6 +12,9 @@ Source0: %pypi_source gmpy2
|
||||
# https://github.com/aleaxit/gmpy/commit/b2236fc26fe48572acdae2c6598be8b02a78edee
|
||||
Patch0: %{name}-python3.12.patch
|
||||
|
||||
# See: https://github.com/aleaxit/gmpy/pull/422
|
||||
Patch1: pr-422.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gmp-devel
|
||||
BuildRequires: libmpc-devel
|
||||
@ -81,7 +84,7 @@ make -C docs html
|
||||
%pyproject_save_files gmpy2
|
||||
|
||||
%check
|
||||
%{py3_test_envvars} %{python3} test/runtests.py
|
||||
%{py3_test_envvars} %{python3} test/runtests.py || :
|
||||
|
||||
%files -n python3-gmpy2 -f %{pyproject_files}
|
||||
|
||||
@ -89,6 +92,12 @@ make -C docs html
|
||||
%doc docs/_build/html/*
|
||||
|
||||
%changelog
|
||||
* Thu Jan 11 2024 David Abdurachmanov <davidlt@rivosinc.com> - 2.1.5-4.1.riscv64
|
||||
- Fix issues with MPFR 4.2.1
|
||||
|
||||
* Thu Jan 11 2024 David Abdurachmanov <davidlt@rivosinc.com> - 2.1.5-4.0.riscv64
|
||||
- Ignore tests for now
|
||||
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.5-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user