Building from source

After SAP NW RFC Library is installed as described in the Installation, the pyrfc repository shall be cloned so that you can build the distribution release wheel, source distribution and documentation.

and Instead of downloading and installing precompiled egg, you need to prepare the toolchain and clone

Toolchain preparation

Install pyrfc build tools

pip install build cython wheel pytest sphinx
  • To get any software from the Git source control system the Git client is required as well, use whatever your distribution has

  • The system must contain a gcc compiler as well as development header and library files as provided by your distribution

Linting and Formatting

Done by tox job ‘lint_format’

cython-lint src/pyrfc --max-line-length=180
ruff check --fix src setup.py tests examples --line-length=120 --ignore=F401
pydocstyle src

Build from source

cd PyRFC
python -m build --wheel --sdist --no-isolation --outdir dist

# or

python -m pip install .

Building the documentation

Ensure that the lib directory of the SAP NW RFC library is in your PATH environment.

Run the tox job for building the documentation and copy the output to gh-pages branch

tox -e docs
git checkout gh-pages
yes | cp -R .tox/docs/tmp/html/. .

Commit and push the changes to gh-pages branch.

Note

An additional file .nojekyll is placed in gh-pages to disable the default GitHub processing which breaks sphinx style folders with leading underscores.