apache / pulsar-client-python

Apache Pulsar Python client library
https://pulsar.apache.org/
Apache License 2.0
51 stars 39 forks source link

[docs] Fix the incorrect API docs generation steps in the release process #131

Closed BewareMyPower closed 1 year ago

BewareMyPower commented 1 year ago

Motivation

https://github.com/apache/pulsar-client-python/pull/126 adds the instruction to include the _pulsar C module when generating the API docs. However, it does not work when the library is installed from pip. It only works when the wheel is installed from dist/*.whl that is generated by the python3 setup.py bdist_wheel command in the README.

The reason is the official Python wheel uses auditwheel to package all dynamic libraries, so the _pulsar.so depends on another dynamic library in the relative path. e.g.

$ ldd ~/.local/lib/python3.8/site-packages/_pulsar.cpython-38-x86_64-linux-gnu.so
        libpulsar-b6dad138.so => /home/xyz/.local/lib/python3.8/site-packages/pulsar_client.libs/libpulsar-b6dad138.so (0x00007f8dc09b3000)
        ...

If we copy the _pulsar.cpython-38-x86_64-linux-gnu.so into the project directory, the libpulsar-b6dad138.so will not be found.

In addition, the path of the static API docs changed after the refactoring of pulsar-site,

Modifications

In RELEASE.md, specify the path of _pulsar.so directly.