On Tue, 2 Jun 2020, Petr Viktorin wrote:
>>> I'm trying to rebuild FreeCAD but I've run into
the following and I
>>> don't know how to fix it.
>>
>> The "Py::Int" is not Python API; it probably comes from C++. Do you
know
>> where it's defined? I haven't been able to find the definition, and
>> searching for "Py::Int" it on the internet gives me general results
for
>> "py" and "int".
>
> Search using quotation marks:
>
>
https://docs.scipy.org/doc/scipy-0.16.1/reference/tutorial/weave.html
>
Ah, thanks!
It seems that weave was deprecated in 2015 and removed from scipy in 2017.
It was never ported to Python 3. The Freecad wiki says "You should compile
against Python 3 and Qt5," so I assume weave should not be used.
How is the weave code getting in? I see the file "DocumentPy.h" doesn't
appear directly in upstream sources. Do you know how it is generated?
Actually, the Py::Int is coming from PyCXX. The bundled copy of PyCXX
defines PYCXX_PYTHON_2TO3 which in turn causes some Python 2 compatibility
things to be defined, like Py::Int. So this broke when moving to using
the unbundled copy of PyCXX.
I submitted a PR with a fix:
https://src.fedoraproject.org/rpms/freecad/pull-request/4
Scott