Skip to content
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

Include the C extension when generating API docs #126

Merged
merged 1 commit into from
May 26, 2023

Conversation

BewareMyPower
Copy link
Contributor

Motivation

#85 (comment)

Some targets in the API docs are referenced from the _pulsar module, while the pydoctor command does not generate API docs for it. It's not friendly to users, e.g. they cannot find which values could _pulsar.ConsumerType be.

pulsar/__init__.py:695: Cannot find link target for "_pulsar.ConsumerType"

Modifications

Fix the documents to describe how to include the API docs for the _pulsar module when generating API docs. It also fixes some other warnings when running the pydoctor command.

### Motivation

apache#85 (comment)

Some targets in the API docs are referenced from the `_pulsar` module,
while the `pydoctor` command does not generate API docs for it. It's not
friendly to users, e.g. they cannot find which values could
`_pulsar.ConsumerType` be.

```
pulsar/__init__.py:695: Cannot find link target for "_pulsar.ConsumerType"
```

### Modifications

Fix the documents to describe how to include the API docs for the
`_pulsar` module when generating API docs. It also fixes some other
warnings when running the `pydoctor` command.
@BewareMyPower BewareMyPower added this to the 3.2.0 milestone May 25, 2023
@BewareMyPower BewareMyPower self-assigned this May 25, 2023
@merlimat merlimat merged commit 39ac8f8 into apache:main May 26, 2023
10 checks passed
@BewareMyPower BewareMyPower deleted the bewaremypower/py-docs branch May 26, 2023 01:19
BewareMyPower added a commit to BewareMyPower/pulsar-client-python that referenced this pull request Jun 5, 2023
…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 added a commit that referenced this pull request Jun 12, 2023
…cess (#131)

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

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

None yet

3 participants