Skip to content

Latest commit

 

History

History
21 lines (19 loc) · 1.34 KB

PythonBinding.md

File metadata and controls

21 lines (19 loc) · 1.34 KB

Steps to generate python bindings for Pravega:

Pre-requisites

  • Python 3.8 and up.
  1. Ensure cargo build works fine.
  2. There are two ways of running generating bindings. This describes the steps where maturin is manually installed.
    • Manually install maturin via pip install maturin==0.14
    • maturin build --release --strip --manylinux off This command auto detects the python interpreter and uses it. To specify a specific interpreter using --interpreter option.
    • maturin sdist to generate the source distribution.
  3. Steps to generate bindings using a docker approach.
    • docker run --rm -v --release --strip --manylinux off
  4. After the bindings are generated by either 2 or 3 the next step is to publish the artifacts.
    • The artifacts can be published via twine
      • pip install twine
      • twine upload -r testpypi target/* this command uploads the artifacts to test.pypi
      • twine upload target/* this command uploads the artifacts to pypi.
    • The artifacts can be published via maturin
      • maturin publish -b pyo3 -p XXX -u YYY -r https://test.pypi.org/legacy/ this publishes the bindings to test.pypi
      • maturin publish -b pyo3 -p XXX -u YYY This publishes the bindings to pypi.