File tree 4 files changed +35
-2
lines changed
4 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 35
35
bash -x .travis-install-pari.sh
36
36
- name : Local build
37
37
run : |
38
- pip install sphinx cython cysignals
38
+ pip install sphinx cython
39
+ pip install git+http://github.com/sagemath/cysignals.git@general_signal_hook#egg=cysignals
39
40
make build
40
41
make install
41
42
make check
Original file line number Diff line number Diff line change 1
- 2.1.3
1
+ 2.2.0a0
Original file line number Diff line number Diff line change 1
1
from .pari_instance import Pari
2
2
from .handle_error import PariError
3
3
from .gen import Gen
4
+ from .custom_block import init_custom_block
5
+
6
+ init_custom_block ()
Original file line number Diff line number Diff line change
1
+ # distutils: libraries = gmp pari
2
+
3
+ # *****************************************************************************
4
+ # Distributed under the terms of the GNU General Public License (GPL)
5
+ # as published by the Free Software Foundation; either version 2 of
6
+ # the License, or (at your option) any later version.
7
+ # http://www.gnu.org/licenses/
8
+ # *****************************************************************************
9
+
10
+ from cysignals.signals cimport add_custom_signals
11
+
12
+ cdef extern from " pari/pari.h" :
13
+ int PARI_SIGINT_block, PARI_SIGINT_pending
14
+
15
+ cdef int custom_signal_is_blocked():
16
+ return PARI_SIGINT_block
17
+
18
+ cdef void custom_signal_unblock():
19
+ global PARI_SIGINT_block
20
+ PARI_SIGINT_block = 0
21
+
22
+ cdef void custom_set_pending_signal(int sig):
23
+ global PARI_SIGINT_pending
24
+ PARI_SIGINT_pending = sig
25
+
26
+ def init_custom_block ():
27
+ add_custom_signals(& custom_signal_is_blocked,
28
+ & custom_signal_unblock,
29
+ & custom_set_pending_signal)
You can’t perform that action at this time.
0 commit comments