commit | 7c567df4b4f675243f2f7dcafea8ef2da4df4ca0 | [log] [tgz] |
---|---|---|
author | Matteo Merli <mmerli@apache.org> | Sun Oct 30 13:18:31 2022 -0700 |
committer | GitHub <noreply@github.com> | Mon Oct 31 04:18:31 2022 +0800 |
tree | 0798f79407c9e65f5914bbbf98d48b8de3451a59 | |
parent | 3e37e447e6d59c12b3dac56a13b7ad7364621d80 [diff] |
Fetch C++ client official release (#25) Since it's now available, fetch the official binaries for the CPP client 3.0.0
cmake -B build cmake --build build -j8 cp build/_pulsar.so . ./setup.py bdist_wheel pip3 install dist/pulsar_client-*.whl --force-reinstall rm _pulsar.so
NOTE
- Here a separate
build
directory is created to store all CMake temporary files. However, thesetup.py
requires the_pulsar.so
is under the project directory.- Add the
--force-reinstall
option to overwrite the existing Python wheel in case your system has already installed a wheel before.
You can run python3 -c 'import pulsar'
to see whether the wheel has been installed successfully. If it failed, check whether dependencies (e.g. libpulsar.so
) are in the system path. If not, make sure the dependencies are in LD_LIBRARY_PATH
(on Linux) or DYLD_LIBRARY_PATH
(on macOS).
Then you can run examples as a simple end-to-end test.
# In terminal 1 python3 ./examples/consumer.py
# In terminal 2 python3 ./examples/producer.py
Before executing the commands above, you must ensure the Pulsar service is running. See here for quick start.
Before running the unit tests, you must run a Pulsar service with all things set up:
./build-support/pulsar-test-service-start.sh
The command above runs a Pulsar standalone in a Docker container. You can run ./build-support/pulsar-test-service-stop.sh
to stop it.
Run all unit tests:
./tests/run-unit-tests.sh
Run a single unit test (e.g. PulsarTest.test_tls_auth
):
python3 ./tests/pulsar_test.py 'PulsarTest.test_tls_auth'