Closed dcantos1 closed 1 year ago
steps: git clone https://github.com/SAP/PyRFC.git cd PyRFC python -m build --wheel --sdist --outdir dist pip install --upgrade --no-index --find-links=dist pyrfc /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer, pypa/build or
other standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!! self.initialize_options()
Creating virtualenv isolated environment... WARNING setup.py install is deprecated. !!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer, pypa/build or
other standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
[tool.setuptools]
in pyproject.toml
is still beta.
config = read_configuration(filepath, True, ignore_option_errors, dist)
running egg_info
creating src/pyrfc.egg-info
writing src/pyrfc.egg-info/PKG-INFO
writing dependency_links to src/pyrfc.egg-info/dependency_links.txt
writing top-level names to src/pyrfc.egg-info/top_level.txt
writing manifest file 'src/pyrfc.egg-info/SOURCES.txt'
reading manifest file 'src/pyrfc.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSES/Apache-2.0.txt'
writing manifest file 'src/pyrfc.egg-info/SOURCES.txt'[tool.setuptools]
in pyproject.toml
is still beta.
config = read_configuration(filepath, True, ignore_option_errors, dist)
running sdist
running egg_info
writing src/pyrfc.egg-info/PKG-INFO
writing dependency_links to src/pyrfc.egg-info/dependency_links.txt
writing top-level names to src/pyrfc.egg-info/top_level.txt
reading manifest file 'src/pyrfc.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSES/Apache-2.0.txt'
writing manifest file 'src/pyrfc.egg-info/SOURCES.txt'
running check
creating pyrfc-2.8.3
creating pyrfc-2.8.3/LICENSES
creating pyrfc-2.8.3/src
creating pyrfc-2.8.3/src/pyrfc
creating pyrfc-2.8.3/src/pyrfc.egg-info
copying files to pyrfc-2.8.3...
copying MANIFEST.in -> pyrfc-2.8.3
copying README.md -> pyrfc-2.8.3
copying pyproject.toml -> pyrfc-2.8.3
copying setup.py -> pyrfc-2.8.3
copying LICENSES/Apache-2.0.txt -> pyrfc-2.8.3/LICENSES
copying src/pyrfc/init.py -> pyrfc-2.8.3/src/pyrfc
copying src/pyrfc/_cyrfc.cpp -> pyrfc-2.8.3/src/pyrfc
copying src/pyrfc/_exception.py -> pyrfc-2.8.3/src/pyrfc
copying src/pyrfc/_utils.py -> pyrfc-2.8.3/src/pyrfc
copying src/pyrfc/csapnwrfc.pxd -> pyrfc-2.8.3/src/pyrfc
copying src/pyrfc.egg-info/PKG-INFO -> pyrfc-2.8.3/src/pyrfc.egg-info
copying src/pyrfc.egg-info/SOURCES.txt -> pyrfc-2.8.3/src/pyrfc.egg-info
copying src/pyrfc.egg-info/dependency_links.txt -> pyrfc-2.8.3/src/pyrfc.egg-info
copying src/pyrfc.egg-info/top_level.txt -> pyrfc-2.8.3/src/pyrfc.egg-info
Writing pyrfc-2.8.3/setup.cfg
Creating tar archive
removing 'pyrfc-2.8.3' (and everything under it)[tool.setuptools]
in pyproject.toml
is still beta.
config = read_configuration(filepath, True, ignore_option_errors, dist)
running egg_info
writing src/pyrfc.egg-info/PKG-INFO
writing dependency_links to src/pyrfc.egg-info/dependency_links.txt
writing top-level names to src/pyrfc.egg-info/top_level.txt
reading manifest file 'src/pyrfc.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSES/Apache-2.0.txt'
writing manifest file 'src/pyrfc.egg-info/SOURCES.txt'[tool.setuptools]
in pyproject.toml
is still beta.
config = read_configuration(filepath, True, ignore_option_errors, dist)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-39
creating build/lib.linux-x86_64-cpython-39/pyrfc
copying src/pyrfc/_utils.py -> build/lib.linux-x86_64-cpython-39/pyrfc
copying src/pyrfc/init.py -> build/lib.linux-x86_64-cpython-39/pyrfc
copying src/pyrfc/_exception.py -> build/lib.linux-x86_64-cpython-39/pyrfc
running build_ext
building 'pyrfc._cyrfc' extension
creating build/temp.linux-x86_64-cpython-39
creating build/temp.linux-x86_64-cpython-39/src
creating build/temp.linux-x86_64-cpython-39/src/pyrfc
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DNDEBUG -D_LARGEFILE_SOURCE -D_CONSOLE -D_FILE_OFFSET_BITS=64 -DSAPonUNIX -DSAPwithUNICODE -DSAPwithTHREADS -DSAPonLIN -I/tmp/build-env-eqk7cbfu/include -I/usr/include/python3.9 -c src/pyrfc/_cyrfc.cpp -o build/temp.linux-x86_64-cpython-39/src/pyrfc/_cyrfc.o -Wall -O2 -fexceptions -funsigned-char -fno-strict-aliasing -Wall -Wno-uninitialized -Wno-deprecated-declarations -Wno-unused-function -Wcast-align -fPIC -pthread -minline-all-stringops -I/dbfs/FileStore/nwrfc/nwrfcsdk//include
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 build/temp.linux-x86_64-cpython-39/src/pyrfc/_cyrfc.o -L/usr/lib/x86_64-linux-gnu -lsapnwrfc -lsapucum -o build/lib.linux-x86_64-cpython-39/pyrfc/_cyrfc.cpython-39-x86_64-linux-gnu.so -L/dbfs/FileStore/nwrfc/nwrfcsdk//lib
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/pyrfc
copying build/lib.linux-x86_64-cpython-39/pyrfc/_utils.py -> build/bdist.linux-x86_64/wheel/pyrfc
copying build/lib.linux-x86_64-cpython-39/pyrfc/init.py -> build/bdist.linux-x86_64/wheel/pyrfc
copying build/lib.linux-x86_64-cpython-39/pyrfc/_cyrfc.cpython-39-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel/pyrfc
copying build/lib.linux-x86_64-cpython-39/pyrfc/_exception.py -> build/bdist.linux-x86_64/wheel/pyrfc
running install_egg_info
running egg_info
writing src/pyrfc.egg-info/PKG-INFO
writing dependency_links to src/pyrfc.egg-info/dependency_links.txt
writing top-level names to src/pyrfc.egg-info/top_level.txt
reading manifest file 'src/pyrfc.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSES/Apache-2.0.txt'
writing manifest file 'src/pyrfc.egg-info/SOURCES.txt'
Copying src/pyrfc.egg-info to build/bdist.linux-x86_64/wheel/pyrfc-2.8.3-py3.9.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/pyrfc-2.8.3.dist-info/WHEEL
creating '/databricks/driver/PyRFC/dist/.tmp-vmayp7m7/pyrfc-2.8.3-cp39-cp39-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'pyrfc/init.py'
adding 'pyrfc/_cyrfc.cpython-39-x86_64-linux-gnu.so'
adding 'pyrfc/_exception.py'
adding 'pyrfc/_utils.py'
adding 'pyrfc-2.8.3.dist-info/Apache-2.0.txt'
adding 'pyrfc-2.8.3.dist-info/METADATA'
adding 'pyrfc-2.8.3.dist-info/WHEEL'
adding 'pyrfc-2.8.3.dist-info/top_level.txt'
adding 'pyrfc-2.8.3.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built pyrfc-2.8.3.tar.gz and pyrfc-2.8.3-cp39-cp39-linux_x86_64.whl
Looking in links: dist
Processing ./dist/pyrfc-2.8.3-cp39-cp39-linux_x86_64.whl
Installing collected packages: pyrfc
Successfully installed pyrfc-2.8.3But i have error:
version
Setting SAPNWRFC_HOME env variable is enough for building pyrfc. For run-time (ie. from pyrfc import *
) SAP NWRFC SDK libraries must be registered on Linux system, like described in "Linux" section here, or using LD_LIBRARY_PATH
:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SAPNWRFC_HOME/lib
If SAP NWRFC SDK not already registered for runtime, apply on of these methods and re-try.
Here another test, how to check if SAP NWRFC SDK binaries are registered on your system:
cd $SAPNWRFC_HOME/bin
sudo chmod a+x rfcexec
./rfcexec # should show something like:
Error: Not all mandatory parameters specified
Please start the program in the following way:
rfcexec -t -a <program ID> -g <gateway host> -x <gateway service>
-f <file with list of allowed commands> -s <allowed Sys ID>
The options "-t" (trace), "-f" and "-s" are optional.
Hello, thank you very much for your comment. I wanted to let you know that it did help me, except for one thing: you made a mistake in the word 'library,' export LD_LIBRARY_PATH=$LD_LIBRRY_PATH:$SAPNWRFC_HOME/lib you missed the 'A.' That's why it wasn't working for me initially, but now everything is okay.
*I have installed the recommended versions of the wheel, Cython among others to install the pyrfc, I have the SAP SDK seteao in the environment variable SAPNWRFC_HOME=/dbfs/FileStore/nwrfc/nwrfcsdk/ and I install the pyrfc following the steps that are detailed but When I try to use the Connection module, it does not find it and I have reinstalled it and sometimes it gives me the error that appears in the screenshots.
Environment
And other times I try to install it and it gives me the following error
It installs fine sometimes and gives me this Connection error