|
From: William S F. <ws...@fu...> - 2022-04-17 17:54:06
|
Can you try with master please? There is one fix since 4.0.2 was released that looks like it might be relevant: https://github.com/swig/swig/pull/1843 . William On Fri, 15 Apr 2022 at 16:14, <kri...@gm...> wrote: > Hi > > > > Our conda-forge feedstock received an automatic PR to add PyPy support. > Unfortunately, I get a lot of errors when compiling the SWIG wrapper like > this: > > > > $SRC_DIR/build/src/swig/CMakeFiles/_stir.dir/stirPYTHON_wrap.cxx:158287:1: > > error: too many initializers for 'PyHeapTypeObject' {aka > '_heaptypeobject'} > > > > This is with swig 4.0.2 and pypy 3.8. You can find the log at Pipelines - > Run 20220414.1 logs (azure.com) > <https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=492070&view=logs&j=4f922444-fdfe-5dcf-b824-02f86439ef14&t=b2a8456a-fb11-5506-ca32-5ccd32538dc0&l=6141> > > > > I find the following in the wrapped file > > > > > > #if PY_VERSION_HEX < 0x02030000 > > typedef struct { > > PyTypeObject type; > > PyNumberMethods as_number; > > PyMappingMethods as_mapping; > > PySequenceMethods as_sequence; > > PyBufferProcs as_buffer; > > PyObject *name, *slots; > > } PyHeapTypeObject; > > #endif > > > > /// stuff > > > > static PyHeapTypeObject SwigPyBuiltin__swig__SwigPyIterator_type = { > > { > > #if PY_VERSION_HEX >= 0x03000000 > > PyVarObject_HEAD_INIT(NULL, 0) > > #else > > PyObject_HEAD_INIT(NULL) > > 0, /* ob_size */ > > #endif > > "stir.SwigPyIterator", /* tp_name */ > > sizeof(SwigPyObject), /* tp_basicsize */ > > 0, /* tp_itemsize */ > > /// more stuff > > > > > > I cannot find any reference to PyHeapTypeObject but wonder if the #if > PY_VERSION_HEX statements are failing with PyPy. > > > > Anyone any suggestions? > > > > Thanks a lot > > > > Kris > > > _______________________________________________ > Swig-user mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swig-user > |