mariomulansky / PySpike

Python implementation of spike distance metrics
http://mariomulansky.github.io/PySpike
Other
71 stars 30 forks source link

Python 3.9 support (build fails) #46

Closed sanjayankur31 closed 3 years ago

sanjayankur31 commented 4 years ago

Hello,

Is there any chance the pyspike may support python3.9? We'd like to include it in NeuroFedora.

Currently, the build fails (because pyspike still uses some deprecated functions from the looks of it):

Mock Version: 2.4
ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-pyspike.spec'], chrootPath='/var/lib/mock/fedora-rawhide-x86_64/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x7f50067881f0>timeout=0uid=1000gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=True)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-pyspike.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False
Building target platforms: x86_64
Building for target x86_64
setting SOURCE_DATE_EPOCH=1598486400
Wrote: /builddir/build/SRPMS/python-pyspike-0.6.0-1.fc34.src.rpm
Child return code was: 0
ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-pyspike.spec'], chrootPath='/var/lib/mock/fedora-rawhide-x86_64/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x7f50067881f0>timeout=0uid=1000gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=True)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-pyspike.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False
Building target platforms: x86_64
Building for target x86_64
setting SOURCE_DATE_EPOCH=1598486400
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.1ATB1j
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf pyspike-0.6.0
+ /usr/bin/gzip -dc /builddir/build/SOURCES/pyspike-0.6.0.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd pyspike-0.6.0
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ rm -rf pyspike.egg-info
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.gHcvBh
+ umask 022
+ cd /builddir/build/BUILD
+ cd pyspike-0.6.0
+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection'
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '
+ /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s'
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/pyspike
copying pyspike/PieceWiseLinFunc.py -> build/lib.linux-x86_64-3.9/pyspike
copying pyspike/psth.py -> build/lib.linux-x86_64-3.9/pyspike
copying pyspike/SpikeTrain.py -> build/lib.linux-x86_64-3.9/pyspike
copying pyspike/PieceWiseConstFunc.py -> build/lib.linux-x86_64-3.9/pyspike
copying pyspike/spikes.py -> build/lib.linux-x86_64-3.9/pyspike
copying pyspike/DiscreteFunc.py -> build/lib.linux-x86_64-3.9/pyspike
copying pyspike/spike_distance.py -> build/lib.linux-x86_64-3.9/pyspike
copying pyspike/__init__.py -> build/lib.linux-x86_64-3.9/pyspike
copying pyspike/spike_sync.py -> build/lib.linux-x86_64-3.9/pyspike
copying pyspike/generic.py -> build/lib.linux-x86_64-3.9/pyspike
copying pyspike/isi_distance.py -> build/lib.linux-x86_64-3.9/pyspike
copying pyspike/spike_directionality.py -> build/lib.linux-x86_64-3.9/pyspike
creating build/lib.linux-x86_64-3.9/pyspike/cython
copying pyspike/cython/directionality_python_backend.py -> build/lib.linux-x86_64-3.9/pyspike/cython
copying pyspike/cython/__init__.py -> build/lib.linux-x86_64-3.9/pyspike/cython
copying pyspike/cython/python_backend.py -> build/lib.linux-x86_64-3.9/pyspike/cython
copying pyspike/cython/cython_add.c -> build/lib.linux-x86_64-3.9/pyspike/cython
copying pyspike/cython/cython_profiles.c -> build/lib.linux-x86_64-3.9/pyspike/cython
copying pyspike/cython/cython_distances.c -> build/lib.linux-x86_64-3.9/pyspike/cython
copying pyspike/cython/cython_directionality.c -> build/lib.linux-x86_64-3.9/pyspike/cython
copying pyspike/cython/cython_simulated_annealing.c -> build/lib.linux-x86_64-3.9/pyspike/cython
running build_ext
skipping 'pyspike/cython/cython_add.c' Cython extension (up-to-date)
skipping 'pyspike/cython/cython_profiles.c' Cython extension (up-to-date)
skipping 'pyspike/cython/cython_distances.c' Cython extension (up-to-date)
skipping 'pyspike/cython/cython_directionality.c' Cython extension (up-to-date)
skipping 'pyspike/cython/cython_simulated_annealing.c' Cython extension (up-to-date)
building 'pyspike.cython.cython_add' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/pyspike
creating build/temp.linux-x86_64-3.9/pyspike/cython
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I/usr/lib64/python3.9/site-packages/numpy/core/include -I/usr/include/python3.9 -c pyspike/cython/cython_add.c -o build/temp.linux-x86_64-3.9/pyspike/cython/cython_add.o
In file included from /usr/lib64/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                 from /usr/lib64/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/lib64/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from pyspike/cython/cython_add.c:242:
/usr/lib64/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
pyspike/cython/cython_add.c: In function ‘PyInit_cython_add’:
pyspike/cython/cython_add.c:20325:25: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
20325 |   __pyx_type___pyx_array.tp_print = 0;
      |                         ^
pyspike/cython/cython_add.c:20328:31: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
20328 |   __pyx_type___pyx_MemviewEnum.tp_print = 0;
      |                               ^
pyspike/cython/cython_add.c:20339:30: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
20339 |   __pyx_type___pyx_memoryview.tp_print = 0;
      |                              ^
pyspike/cython/cython_add.c:20348:35: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
20348 |   __pyx_type___pyx_memoryviewslice.tp_print = 0;
      |                                   ^
pyspike/cython/cython_add.c: In function ‘__Pyx_ParseOptionalKeywords’:
pyspike/cython/cython_add.c:20700:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20700 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                     ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from pyspike/cython/cython_add.c:4:
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyspike/cython/cython_add.c:20700:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
20700 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                     ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from pyspike/cython/cython_add.c:4:
/usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
  580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
pyspike/cython/cython_add.c:20700:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20700 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                     ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from pyspike/cython/cython_add.c:4:
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyspike/cython/cython_add.c:20700:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20700 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                     ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from pyspike/cython/cython_add.c:4:
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyspike/cython/cython_add.c:20700:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
20700 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                     ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from pyspike/cython/cython_add.c:4:
/usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
  580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
pyspike/cython/cython_add.c:20700:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20700 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                     ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from pyspike/cython/cython_add.c:4:
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyspike/cython/cython_add.c:20716:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20716 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                         ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from pyspike/cython/cython_add.c:4:
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyspike/cython/cython_add.c:20716:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
20716 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                         ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from pyspike/cython/cython_add.c:4:
/usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
  580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
pyspike/cython/cython_add.c:20716:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20716 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                         ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from pyspike/cython/cython_add.c:4:
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyspike/cython/cython_add.c:20716:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20716 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                         ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from pyspike/cython/cython_add.c:4:
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyspike/cython/cython_add.c:20716:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
20716 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                         ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from pyspike/cython/cython_add.c:4:
/usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
  580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
pyspike/cython/cython_add.c:20716:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20716 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                         ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from pyspike/cython/cython_add.c:4:
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyspike/cython/cython_add.c: In function ‘__Pyx_decode_c_string’:
pyspike/cython/cython_add.c:21924:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
21924 |         return PyUnicode_FromUnicode(NULL, 0);
      |         ^~~~~~
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from pyspike/cython/cython_add.c:4:
/usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here
  551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
      |                                          ^~~~~~~~~~~~~~~~~~~~~
pyspike/cython/cython_add.c: In function ‘__Pyx_ExceptionSave’:
pyspike/cython/cython_add.c:21936:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
21936 |     *type = tstate->exc_type;
      |                     ^~~~~~~~
      |                     curexc_type
pyspike/cython/cython_add.c:21937:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
21937 |     *value = tstate->exc_value;
      |                      ^~~~~~~~~
      |                      curexc_value
pyspike/cython/cython_add.c:21938:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
21938 |     *tb = tstate->exc_traceback;
      |                   ^~~~~~~~~~~~~
      |                   curexc_traceback
pyspike/cython/cython_add.c: In function ‘__Pyx_ExceptionReset’:
pyspike/cython/cython_add.c:21950:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
21950 |     tmp_type = tstate->exc_type;
      |                        ^~~~~~~~
      |                        curexc_type
pyspike/cython/cython_add.c:21951:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
21951 |     tmp_value = tstate->exc_value;
      |                         ^~~~~~~~~
      |                         curexc_value
pyspike/cython/cython_add.c:21952:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
21952 |     tmp_tb = tstate->exc_traceback;
      |                      ^~~~~~~~~~~~~
      |                      curexc_traceback
pyspike/cython/cython_add.c:21953:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
21953 |     tstate->exc_type = type;
      |             ^~~~~~~~
      |             curexc_type
pyspike/cython/cython_add.c:21954:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
21954 |     tstate->exc_value = value;
      |             ^~~~~~~~~
      |             curexc_value
pyspike/cython/cython_add.c:21955:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
21955 |     tstate->exc_traceback = tb;
      |             ^~~~~~~~~~~~~
      |             curexc_traceback
pyspike/cython/cython_add.c: In function ‘__Pyx_GetException’:
pyspike/cython/cython_add.c:21998:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
21998 |     tmp_type = tstate->exc_type;
      |                        ^~~~~~~~
      |                        curexc_type
pyspike/cython/cython_add.c:21999:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
21999 |     tmp_value = tstate->exc_value;
      |                         ^~~~~~~~~
      |                         curexc_value
pyspike/cython/cython_add.c:22000:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
22000 |     tmp_tb = tstate->exc_traceback;
      |                      ^~~~~~~~~~~~~
      |                      curexc_traceback
pyspike/cython/cython_add.c:22001:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
22001 |     tstate->exc_type = local_type;
      |             ^~~~~~~~
      |             curexc_type
pyspike/cython/cython_add.c:22002:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
22002 |     tstate->exc_value = local_value;
      |             ^~~~~~~~~
      |             curexc_value
pyspike/cython/cython_add.c:22003:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
22003 |     tstate->exc_traceback = local_tb;
      |             ^~~~~~~~~~~~~
      |             curexc_traceback
pyspike/cython/cython_add.c: In function ‘__Pyx_ExceptionSwap’:
pyspike/cython/cython_add.c:22025:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
22025 |     tmp_type = tstate->exc_type;
      |                        ^~~~~~~~
      |                        curexc_type
pyspike/cython/cython_add.c:22026:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
22026 |     tmp_value = tstate->exc_value;
      |                         ^~~~~~~~~
      |                         curexc_value
pyspike/cython/cython_add.c:22027:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
22027 |     tmp_tb = tstate->exc_traceback;
      |                      ^~~~~~~~~~~~~
      |                      curexc_traceback
pyspike/cython/cython_add.c:22028:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
22028 |     tstate->exc_type = *type;
      |             ^~~~~~~~
      |             curexc_type
pyspike/cython/cython_add.c:22029:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
22029 |     tstate->exc_value = *value;
      |             ^~~~~~~~~
      |             curexc_value
pyspike/cython/cython_add.c:22030:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
22030 |     tstate->exc_traceback = *tb;
      |             ^~~~~~~~~~~~~
      |             curexc_traceback
In file included from /usr/lib64/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:21,
                 from /usr/lib64/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from pyspike/cython/cython_add.c:242:
At top level:
/usr/lib64/python3.9/site-packages/numpy/core/include/numpy/__multiarray_api.h:1463:1: warning: ‘_import_array’ defined but not used [-Wunused-function]
 1463 | _import_array(void)
      | ^~~~~~~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1
error: Bad exit status from /var/tmp/rpm-tmp.gHcvBh (%build)
    Bad exit status from /var/tmp/rpm-tmp.gHcvBh (%build)
RPM build errors:
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/util.py", line 776, in do_with_status
    raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
mockbuild.exception.Error: Command failed: 
 # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-pyspike.spec
gspr commented 4 years ago

For what it's worth, the PySpike Debian package works fine with Python 3.9 [1]. If I recall correctly, the errors you see have cropped up in Debian during Python transitions before. I believe the solution was to ensure that a new enough Cython was doing the cythenization. Let me know if I can be of help.

[1] https://buildd.debian.org/status/fetch.php?pkg=python-pyspike&arch=amd64&ver=0.6.0-2%2Bb2&stamp=1602854804&raw=0

sanjayankur31 commented 4 years ago

Thanks @gspr: Fedora has Cython 0.29.21 at the moment, which is what the log you've linked to also uses (cython3 amd64 0.29.21-2). I'll retry a build and see what I get.

sanjayankur31 commented 3 years ago

Using the github sources instead of the pypi tar fixes it. Closing.