Version 1.11.2.

Drop upstreamed -minsigstksz patch.
This commit is contained in:
Jerry James 2022-03-17 15:34:57 -06:00
parent e0c7de86a9
commit b739b12a92
6 changed files with 52 additions and 57 deletions

14
README.md Normal file
View File

@ -0,0 +1,14 @@
# 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,11 +1,11 @@
diff -up src/scripts/cysignals-CSI.orig src/scripts/cysignals-CSI
--- 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')
--- 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'

View File

@ -1,12 +0,0 @@
--- src/cysignals/implementation.c.orig 2021-05-27 14:03:35.653774857 -0600
+++ src/cysignals/implementation.c 2021-05-27 14:19:42.225312505 -0600
@@ -445,7 +445,8 @@ static void setup_alt_stack(void)
/* Static space for the alternate signal stack. The size should be
* of the form MINSIGSTKSZ + constant. The constant is chosen rather
* ad hoc but sufficiently large. */
- static char alt_stack[MINSIGSTKSZ + 5120 + BACKTRACELEN * sizeof(void*)];
+ /* MINSIGSTKSIZE is now nonconstant. */
+ static char alt_stack[4096 + 5120 + BACKTRACELEN * sizeof(void*)];
stack_t ss;
ss.ss_sp = alt_stack;

View File

@ -1,8 +0,0 @@
# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON
# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors
# No man page: user should not invoke the script directly
addFilter(r'W: no-manual-page-for-binary cysignals-CSI')
# Documentation is in the -doc subpackage
addFilter(r'python3-cysignals-devel\.[^:]+: W: no-documentation')

View File

@ -3,13 +3,16 @@
# 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.10.3
Release: 3%{?dist}
Version: 1.11.2
Release: 1%{?dist}
Summary: Interrupt and signal handling for Cython
License: LGPLv3+
URL: https://github.com/sagemath/%{modname}
Source0: %{url}/archive/refs/tags/%{version}.tar.gz
URL: https://github.com/sagemath/cysignals
Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libtool
@ -27,8 +30,6 @@ Patch3: %{name}-underlink.patch
Patch4: %{name}-crash-logs.patch
# Remove workaround for Cython bug that is already fixed in Fedora
Patch5: %{name}-sigismember.patch
# Workaround for nonconstant MINSIGSTKSZ
Patch6: %{name}-minsigstksz.patch
%global _description %{expand:
When writing Cython code, special care must be taken to ensure that the
@ -49,24 +50,26 @@ See http://cysignals.readthedocs.org/ for the full documentation.}
%package -n python3-%{modname}
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3-docs
BuildRequires: python3dist(cython)
BuildRequires: python3dist(setuptools)
BuildRequires: %{py3_dist cython}
BuildRequires: %{py3_dist pip}
BuildRequires: %{py3_dist setuptools}
BuildRequires: %{py3_dist wheel}
%description -n python3-%{modname} %{_description}
%package -n python3-%{modname}-devel
Summary: %{summary} headers files
Requires: python3-%{modname}
Requires: python3-%{modname}%{?_isa} = %{version}-%{release}
Requires: pari-devel
%description -n python3-%{modname}-devel %{_description}
%package doc
Summary: Documentation for %{name}
BuildRequires: python3dist(sphinx)
Requires: python3-%{modname}
BuildRequires: python3-docs
BuildRequires: %{py3_dist sphinx}
BuildArch: noarch
%description doc
Documentation and examples for %{name}.
@ -74,7 +77,7 @@ Documentation and examples for %{name}.
%autosetup -p0 -n %{modname}-%{version}
# Use local objects.inv for intersphinx
sed -i "s|'https://docs\.python\.org/2\.7', None|'https://docs.python.org/3', '%{_docdir}/python3-docs/html/objects.inv'|" docs/source/conf.py
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
@ -87,18 +90,17 @@ autoreconf -fi .
%build
%configure
%py3_build
%pyproject_wheel
# Build the documentation
export PYTHONPATH=$PWD/$(ls -1d build/lib.linux*%{python3_version})
export PYTHONPATH=%{pyproject_build_lib}
make -C docs html
rst2html --no-datestamp README.rst README.html
%install
%py3_install
mkdir -p %{buildroot}%{_docdir}/%{name}
cp -farp docs/build/html %{buildroot}%{_docdir}/%{name}
rm %{buildroot}%{_docdir}/%{name}/html/.buildinfo
%pyproject_install
%pyproject_save_files cysignals
rm docs/build/html/.buildinfo
%check
PATH=%{buildroot}%{_bindir}:$PATH
@ -106,13 +108,10 @@ PYTHONPATH=%{buildroot}%{python3_sitearch}
export PATH PYTHONPATH
%{python3} rundoctests.py src/cysignals/*.pyx
%files -n python3-%{modname}
%license LICENSE
%files -n python3-%{modname} -f %{pyproject_files}
%doc README.html
%{_bindir}/%{modname}-CSI
%{_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
@ -120,13 +119,15 @@ export PATH PYTHONPATH
%files -n python3-%{modname}-devel
%{python3_sitearch}/%{modname}/*.h
%{python3_sitearch}/%{modname}/*.pxd
%{python3_sitearch}/%{modname}/*.pxi
%files doc
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/html
%doc docs/build/html
%changelog
* 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

View File

@ -1 +1 @@
SHA512 (1.10.3.tar.gz) = aa7549afca7006ef3565b612f6b10e43fe135b4383c0b3ea9ecba56a0a6bc79de269cf6c0cb02ab758c9e259f2c8b9461438903b349c84e0e4e2c906964ebe95
SHA512 (cysignals-1.11.2.tar.gz) = 9beed298e1e9bdbea1254b621a33bc2f95892f4e6f4d1c3ba13a825b2c1a83b0f36f214428a956a0d58b4e97d3eaa31a839ceb404c0ac19a64aa69751736556b