Compare commits

..

No commits in common. "rawhide" and "f29" have entirely different histories.
rawhide ... f29

10 changed files with 139 additions and 211 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
/*.tar.gz
/cysignals-*.tar.gz

View File

@ -1,14 +0,0 @@
# python-cysignals
When writing [Cython](http://cython.org/) code, special care must be taken to
ensure that the code can be interrupted with `CTRL-C`. Since Cython optimizes
for speed, Cython normally does not check for interrupts. For example, code
like the following cannot be interrupted in Cython:
```
while True:
pass
```
The [cysignals](https://github.com/sagemath/cysignals) package provides
mechanisms to handle interrupts (and other signals and errors) in Cython code.

View File

@ -1,14 +0,0 @@
--- src/scripts/cysignals-CSI.orig 2019-10-25 09:09:23.892784878 -0600
+++ src/scripts/cysignals-CSI 2019-10-25 09:24:39.077211746 -0600
@@ -172,7 +172,10 @@ def save_backtrace(output):
except KeyError:
pass
- mkdir_p(bt_dir)
+ try:
+ mkdir_p(bt_dir)
+ except PermissionError:
+ return None
if bt_days >= 0:
prune_old_logs(bt_dir, bt_days)
f, filename = tempfile.mkstemp(dir=bt_dir, prefix='crash_', suffix='.log')

View File

@ -1,7 +1,6 @@
diff -up src/cysignals/implementation.c.orig src/cysignals/implementation.c
--- src/cysignals/implementation.c.orig 2018-07-10 14:22:01.000000000 -0600
+++ src/cysignals/implementation.c 2018-08-01 13:27:13.278964441 -0600
@@ -118,7 +118,7 @@ static int sig_raise_exception(int sig,
@@ -107,7 +107,7 @@ static int sig_raise_exception(int sig,
*/
static inline void reset_CPU(void)
{

View File

@ -1,12 +1,15 @@
diff -up setup.py.orig setup.py
--- setup.py.orig 2019-03-14 07:39:24.000000000 -0600
+++ setup.py 2019-04-08 09:38:40.734211624 -0600
@@ -50,7 +50,7 @@ kwds = dict(include_dirs=[opj("src"),
depends=depends,
define_macros=macros,
undef_macros=undef_macros,
- extra_compile_args=["-pthread"],
+ extra_compile_args=["-Wp,-U_FORTIFY_SOURCE", "-pthread"],
extra_link_args=["-pthread"],)
--- setup.py.orig 2018-08-01 13:27:41.966583309 -0600
+++ setup.py 2018-08-01 13:28:43.609764343 -0600
@@ -45,9 +45,12 @@ if sys.platform == 'cygwin':
# false positives in the longjmp() check.
undef_macros = ["_FORTIFY_SOURCE"]
+extra_compile_args = ["-Wp,-U_FORTIFY_SOURCE"]
+
kwds = dict(include_dirs=[opj("src"),
opj("src", "cysignals")],
depends=depends,
+ extra_compile_args=extra_compile_args,
define_macros=macros,
undef_macros=undef_macros)
extensions = [

View File

@ -1,11 +1,11 @@
diff -up src/scripts/cysignals-CSI.orig src/scripts/cysignals-CSI
--- src/scripts/cysignals-CSI.orig 2022-03-03 10:58:08.469357325 -0700
+++ src/scripts/cysignals-CSI 2022-03-03 10:59:35.932408021 -0700
@@ -57,6 +57,7 @@ def gdb_commands(pid, color):
cmds = b''
cmds += b'set prompt (cysignals-gdb-prompt)\n'
cmds += b'set verbose off\n'
+ cmds += b'set auto-load safe-path /\n'
cmds += b'attach %d\n' % pid
cmds += b'python\n'
cmds += b'print("\\n")\n'
--- src/scripts/cysignals-CSI.orig 2018-04-17 06:09:44.000000000 -0600
+++ src/scripts/cysignals-CSI 2018-05-18 13:06:09.309487709 -0600
@@ -69,6 +69,7 @@ def gdb_commands(pid, color):
cmds = b('')
cmds += b('set prompt (cysignals-gdb-prompt)\n')
cmds += b('set verbose off\n')
+ cmds += b('set auto-load safe-path /\n')
cmds += b('attach {0}\n'.format(pid))
cmds += b('python\n')
cmds += b('print("\\n")\n')

View File

@ -1,14 +0,0 @@
--- src/cysignals/pysignals.pyx.orig 2019-03-14 07:39:24.000000000 -0600
+++ src/cysignals/pysignals.pyx 2019-10-25 10:27:20.768572126 -0600
@@ -44,11 +44,6 @@ from cpython.object cimport Py_EQ, Py_NE
from cpython.exc cimport PyErr_SetFromErrno, PyErr_CheckSignals
-# Fix https://github.com/cython/cython/pull/2756
-cdef extern from "<signal.h>" nogil:
- int sigismember(const sigset_t *, int)
-
-
cdef class SigAction:
"""
An opaque object representing an OS-level signal handler.

View File

@ -1,10 +1,9 @@
diff -up setup.py.orig setup.py
--- setup.py.orig 2019-04-08 09:38:40.734211624 -0600
+++ setup.py 2019-04-08 09:39:15.984581008 -0600
@@ -52,9 +52,11 @@ kwds = dict(include_dirs=[opj("src"),
undef_macros=undef_macros,
extra_compile_args=["-Wp,-U_FORTIFY_SOURCE", "-pthread"],
extra_link_args=["-pthread"],)
--- setup.py.orig 2018-08-01 13:28:43.609764343 -0600
+++ setup.py 2018-08-01 13:31:04.099897839 -0600
@@ -53,9 +53,11 @@ kwds = dict(include_dirs=[opj("src"),
extra_compile_args=extra_compile_args,
define_macros=macros,
undef_macros=undef_macros)
+parikwds = kwds.copy()
+parikwds['libraries'] = ['pari']

View File

@ -3,20 +3,14 @@
# Python files are installed into nonstandard locations
%global _python_bytecompile_extra 0
# Install documentation in the main package directory
%global _docdir_fmt %{name}
Name: python-%{modname}
Version: 1.11.2
Release: 4%{?dist}
Version: 1.7.2
Release: 1%{?dist}
Summary: Interrupt and signal handling for Cython
License: LGPL-3.0-or-later
URL: https://github.com/sagemath/cysignals
Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: make
License: LGPLv3+
URL: https://github.com/sagemath/%{modname}
Source0: https://github.com/sagemath/%{modname}/releases/download/%{version}/%{modname}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: pari-devel
# https://bugzilla.redhat.com/show_bug.cgi?id=1445411#c2
Patch0: %{name}-gdb.patch
@ -26,92 +20,136 @@ Patch1: %{name}-emms.patch
Patch2: %{name}-fortify.patch
# Fix underlinked signals.so
Patch3: %{name}-underlink.patch
# Do not fail if cysignals_crash_logs cannot be created
Patch4: %{name}-crash-logs.patch
# Remove workaround for Cython bug that is already fixed in Fedora
Patch5: %{name}-sigismember.patch
%global _description %{expand:
When writing Cython code, special care must be taken to ensure that the
code can be interrupted with CTRL-C. Since Cython optimizes for speed,
Cython normally does not check for interrupts. For example, code like
the following cannot be interrupted in Cython:
while True:
pass
The cysignals package provides mechanisms to handle interrupts
(and other signals and errors) in Cython code.
See http://cysignals.readthedocs.org/ for the full documentation.}
%global _description \
When writing Cython code, special care must be taken to ensure that the\
code can be interrupted with CTRL-C. Since Cython optimizes for speed,\
Cython normally does not check for interrupts. For example, code like\
the following cannot be interrupted in Cython:\
\
while True:\
pass\
\
The cysignals package provides mechanisms to handle interrupts\
(and other signals and errors) in Cython code.\
\
See http://cysignals.readthedocs.org/ for the full documentation.
%description %{_description}
%package -n python2-%{modname}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{modname}}
BuildRequires: python2-devel
BuildRequires: python2-Cython
BuildRequires: python2-setuptools
Requires: python2-Cython
%description -n python2-%{modname} %{_description}
%package -n python2-%{modname}-devel
Summary: %{summary} headers files
%{?python_provide:%python_provide python2-%{modname}-devel}
Requires: python2-%{modname}
%description -n python2-%{modname}-devel %{_description}
%package -n python3-%{modname}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{modname}}
BuildRequires: python3-devel
BuildRequires: %{py3_dist cython}
BuildRequires: %{py3_dist pip}
BuildRequires: %{py3_dist setuptools}
BuildRequires: %{py3_dist wheel}
BuildRequires: python3-Cython
BuildRequires: python3-setuptools
Requires: python3-Cython
%description -n python3-%{modname} %{_description}
%package -n python3-%{modname}-devel
Summary: %{summary} headers files
Requires: python3-%{modname}%{?_isa} = %{version}-%{release}
Requires: pari-devel
%{?python_provide:%python_provide python3-%{modname}-devel}
Requires: python3-%{modname}
%description -n python3-%{modname}-devel %{_description}
%package doc
Summary: Documentation for %{name}
BuildRequires: python3-docs
BuildRequires: %{py3_dist sphinx}
BuildRequires: python2-sphinx
Requires: python2-%{modname}
BuildArch: noarch
%description doc
Documentation and examples for %{name}.
%prep
%autosetup -p0 -n %{modname}-%{version}
# Use local objects.inv for intersphinx
sed -i "s|'https://docs\.python\.org/3', None|'https://docs.python.org/3', '%{_docdir}/python3-docs/html/objects.inv'|" docs/source/conf.py
# Build for python 3
sed -i 's/language_level=2/language_level=3/' setup.py
# The doctest timeout is sometimes too short for 32-bit builders
sed -i 's/600/2400/' rundoctests.py
# Upstream does not generate the configure script
autoreconf -fi .
%setup -q -n %{modname}-%{version}
%patch0
%patch1
%patch2
%patch3
%build
%configure
%pyproject_wheel
sed -i 's/"cysignals-CSI"/"cysignals-CSI-2"/' src/cysignals/implementation.c
%py2_build
sed -i 's/"cysignals-CSI-2"/"cysignals-CSI-3"/' src/cysignals/implementation.c
%py3_build
# Build the documentation
export PYTHONPATH=%{pyproject_build_lib}
make -C docs html
rst2html --no-datestamp README.rst README.html
export PYTHONPATH=$PWD/$(ls -1d build/lib.linux*%{python2_version})
%__make -C docs html
%install
%pyproject_install
%pyproject_save_files cysignals
rm docs/build/html/.buildinfo
%py2_install
%py3_install
mkdir -p %{buildroot}%{_docdir}/%{name}
cp -farp docs/build/html %{buildroot}%{_docdir}/%{name}
rm %{buildroot}%{_docdir}/%{name}/html/.buildinfo
cp -p %{buildroot}%{_bindir}/cysignals-CSI{,-3}
sed -i 's@^\(#!/usr/bin/python\)3\( -s\)@\12\2@' %{buildroot}%{_bindir}/cysignals-CSI
mv %{buildroot}%{_bindir}/cysignals-CSI{,-2}
%check
for check in src/cysignals/*.pyx; do
sed -i -e "s/Popen(\['python'/Popen(\['python2'/" $check
done
PATH=%{buildroot}%{_bindir}:$PATH
PYTHONPATH=%{buildroot}%{python3_sitearch}
PYTHONPATH=%{buildroot}%{python2_sitearch}
export PATH PYTHONPATH
%{python3} rundoctests.py src/cysignals/*.pyx
%{__python2} rundoctests.py src/cysignals/*.pyx
# FIXME - not interrupting the timer - not fully functional for python3?
#File "src/cysignals/pselect.pyx", line 243, in pselect.pyx
#Failed example:
# (0.2 <= t <= 0.9) or t
#Expected:
# True
#Got:
# 1.004807949066162
for check in src/cysignals/*.pyx; do
sed -i -e "s/Popen(\['python2'/Popen(\['python3'/" $check
done
PYTHONPATH=%{buildroot}%{python3_sitearch}
export PYTHONPATH
%{__python3} rundoctests.py src/cysignals/*.pyx || :
%files -n python3-%{modname} -f %{pyproject_files}
%doc README.html
%{_bindir}/%{modname}-CSI
%files -n python2-%{modname}
%license LICENSE
%doc PKG-INFO README.rst
%{_bindir}/%{modname}-CSI-2
%{_datadir}/%{modname}/
%{python2_sitearch}/%{modname}
%{python2_sitearch}/%{modname}-*.egg-info
%exclude %{python2_sitearch}/%{modname}/*.h
%exclude %{python2_sitearch}/%{modname}/*.pxd
%exclude %{python2_sitearch}/%{modname}/*.pxi
%files -n python2-%{modname}-devel
%{python2_sitearch}/%{modname}/*.h
%{python2_sitearch}/%{modname}/*.pxd
%{python2_sitearch}/%{modname}/*.pxi
%files -n python3-%{modname}
%license LICENSE
%doc PKG-INFO README.rst
%{_bindir}/%{modname}-CSI-3
%{_datadir}/%{modname}/
%{python3_sitearch}/%{modname}
%{python3_sitearch}/%{modname}-*.egg-info
%exclude %{python3_sitearch}/%{modname}/*.h
%exclude %{python3_sitearch}/%{modname}/*.pxd
%exclude %{python3_sitearch}/%{modname}/*.pxi
@ -119,82 +157,13 @@ export PATH PYTHONPATH
%files -n python3-%{modname}-devel
%{python3_sitearch}/%{modname}/*.h
%{python3_sitearch}/%{modname}/*.pxd
%{python3_sitearch}/%{modname}/*.pxi
%files doc
%doc docs/build/html
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/html
%changelog
* Tue Sep 27 2022 Jerry James <loganjerry@gmail.com> - 1.11.2-4
- Rebuild for pari 2.15.0
- Convert License tag to SPDX
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.11.2-2
- Rebuilt for Python 3.11
* Thu Mar 17 2022 Jerry James <loganjerry@gmail.com> - 1.11.2-1
- Version 1.11.2
- Drop upstreamed -minsigstksz patch
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jun 17 2021 Jerry James <loganjerry@gmail.com> - 1.10.3-1
- Version 1.10.3
- Add -minsigstksz patch to fix FTBFS (bz 1935643)
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.10.2-12
- Rebuilt for Python 3.10
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Nov 9 2020 Jerry James <loganjerry@gmail.com> - 1.10.2-10
- Rebuild for pari 2.13.0
- Add pari-devel R to -devel subpackage
- Increase doctest timeout
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.2-9
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.10.2-7
- Rebuilt for Python 3.9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jan 25 2020 Jerry James <loganjerry@gmail.com> - 1.10.2-5
- Do not try to write to an unwritable directory (bz 1751021)
- Fix cross-references in the documentation
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.10.2-4
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.10.2-3
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Apr 23 2019 Jerry James <loganjerry@gmail.com> - 1.10.2-1
- New upstream release
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jan 17 2019 Jerry James <loganjerry@gmail.com> - 1.8.1-1
- New upstream release
- Drop python2 subpackages (bz 1663842)
* Fri Aug 10 2018 Jerry James <loganjerry@gmail.com> - 1.7.2-1
- New upstream release (bz 1601237)
- Drop upstreamed -import patch

View File

@ -1 +1 @@
SHA512 (cysignals-1.11.2.tar.gz) = 9beed298e1e9bdbea1254b621a33bc2f95892f4e6f4d1c3ba13a825b2c1a83b0f36f214428a956a0d58b4e97d3eaa31a839ceb404c0ac19a64aa69751736556b
SHA512 (cysignals-1.7.2.tar.gz) = aa3526322f081877c5e9a51a4247a2b8c7c39bff0d96e2daabcfce27b7792e4403693a6077edc4198d57b8c72b7fd87eb42bd796cdc599d8963efd94b1100429