Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

BewareMyPower
Copy link
Contributor

@BewareMyPower BewareMyPower commented Jun 5, 2023

Motivation

#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.

…cess

### Motivation

apache#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.

```bash
$ 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.

### Modifications

In `RELEASE.md`, specify the path of `_pulsar.so` directly.
@BewareMyPower BewareMyPower added this to the 3.3.0 milestone Jun 5, 2023
@BewareMyPower BewareMyPower self-assigned this Jun 5, 2023
Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

git commit -m "Generate Python client X.Y.0 doc"
git push origin py-docs-X.Y
git commit -m "Generate Python client $VERSION.0 doc"
git push origin py-docs-$VERSION
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to use a fork but it's fair enough to push origin.

@BewareMyPower BewareMyPower merged commit 1a2fb07 into apache:main Jun 12, 2023
@BewareMyPower BewareMyPower deleted the bewaremypower/fix-release-process branch June 12, 2023 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants