I have three Linux servers, supposed to be the same. On the first two servers, I managed to install PyRFC, but on the third I got the following error:
Using cached pyrfc-2.8.2.tar.gz (284 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
A few lines here...
And then:
Error compiling Cython file:
------------------------------------------------------------
...
self.install_bgrfc_handlers(sysId)
def install_bgrfc_handlers(self, sysId):
ucSysId = fillString(sysId)
cdef RFC_ERROR_INFO errorInfo
cdef RFC_RC rc = RfcInstallBgRfcHandlers (ucSysId, Server.__onCheckFunction, Server.__onCommitFunction, Server.__onRollbackFunction, Server.__onConfirmFunction, Server.__onGetStateFunction, &errorInfo)
^
------------------------------------------------------------
src/pyrfc/_cyrfc.pyx:1710:65: Cannot assign type 'RFC_RC (RFC_CONNECTION_HANDLE, const RFC_UNIT_IDENTIFIER *) except * nogil' to 'RFC_ON_CHECK_UNIT'
Error compiling Cython file:
Some lines... And:
src/pyrfc/_cyrfc.pyx:1762:73: Cannot assign type 'RFC_RC (const SAP_UC *, RFC_ATTRIBUTES, RFC_FUNCTION_DESC_HANDLE *) except * nogil' to 'RFC_FUNC_DESC_CALLBACK'
Compiling src/pyrfc/_cyrfc.pyx because it changed.
[1/1] Cythonizing src/pyrfc/_cyrfc.pyx
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
Cython.Compiler.Errors.CompileError: src/pyrfc/_cyrfc.pyx
On the two servers, PyRFC installed properly: I created a Python virtual env with virtualenv and installed the package and everything went OK. On the third server (when I didn’t manage to install PyRFC), I installed the Python virtual env again with virtualenv and even on the virtual env I got the error message as at the root Python.