- Notifications
You must be signed in to change notification settings - Fork 2
chore: multiple os release setup #63
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
Conversation
Time Submission Status
|
| Have you tested it on forked repository somewhere? @georgeciubotaru |
| checking on my forked repo |
| @georgeciubotaru I try it on my forked repo, but it fails More details: |
MicBun left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unable to run the examples file now.
steps to reproduce
pip install --force-reinstall https://github.com/MicBun/sdk-py/releases/download/v0.3.4/trufnetwork_sdk_py-0.1.0-py3-none-any.whl cd examples python main.py logs
Traceback (most recent call last): File "/home/micbun/MicBun/sdk-py/examples/main.py", line 2, in <module> from trufnetwork_sdk_py.client import TNClient File "/home/micbun/MicBun/sdk-py/.venv/lib/python3.12/site-packages/trufnetwork_sdk_py/__init__.py", line 1, in <module> from .client import ( File "/home/micbun/MicBun/sdk-py/.venv/lib/python3.12/site-packages/trufnetwork_sdk_py/client.py", line 2, in <module> import trufnetwork_sdk_c_bindings.exports as truf_sdk File "/home/micbun/MicBun/sdk-py/.venv/lib/python3.12/site-packages/trufnetwork_sdk_c_bindings/exports.py", line 17, in <module> from . import _trufnetwork_sdk_c_bindings ImportError: cannot import name '_trufnetwork_sdk_c_bindings' from 'trufnetwork_sdk_c_bindings' (/home/micbun/MicBun/sdk-py/.venv/lib/python3.12/site-packages/trufnetwork_sdk_c_bindings/__init__.py) | Is this also related? |
| Now i got Have you try to install from created wheel? Is it working on Mac? @georgeciubotaru |
| @MicBun Yes. followed the commands make gopy_build |
| I still get this error when running examples (using pip install from whl) Building that tries to supports both os seems break things(?) Step I use
The fork https://github.com/MicBun/sdk-py/releases/tag/v0.3.3 |
| Let's pause this in favor of higher priority tasks |
| @williamrusdyputra could you help here if there are no higher priority tasks? I can't test the Mac part. |
| @MicBun I got the error trying to install from released wheel, when I see George's commands, the reason he doesn't get this error is he used |
| log: investigating |
| @MicBun could you try again, using this PR changes to your forked repo note: you must add this change to your released version, so it uses the latest setup file from this PR |
db5ecf7 to a3f7450 Compare <img width="1274" alt="Screenshot 2025-06-24 at 17 31 02" src="https://github.com/user-attachments/assets/92dd2459-7b3c-4a83-ad8b-bcda6ec4c3d0" /> repo: https://github.com/williamrusdyputra/sdk-py/releases/tag/v0.3.6 `pip install --force-reinstall https://github.com/williamrusdyputra/sdk-py/releases/download/v0.3.6/trufnetwork_sdk_py-0.3.3-cp312-cp312-macosx_14_0_universal2.whl`
| Let me test one more times |
## Description This PR resolves a shared library loading issue on Linux and introduces a robust testing framework to prevent future regressions. * **Fixes Linux `ImportError`**: The SDK's compiled Go library (`.so` file) is now built with an embedded `RPATH`. This makes the library self-contained and removes the need for users to manually configure `LD_LIBRARY_PATH`, simplifying installation. * **Adds Distribution Testing**: A new GitHub Actions workflow has been added to test the package distribution on Linux and macOS. This workflow builds the wheel in a clean Docker environment and runs a smoke test to ensure it installs and imports correctly, directly verifying the fix. * **Removes Documentation**: The `README.md` section detailing the `LD_LIBRARY_PATH` workaround has been removed as it is no longer necessary. ## Related Problem - related to #63 ## How Has This Been Tested? This change is validated by a new, automated CI workflow (`distribution-test.yml`). For every pull request, this workflow: 1. Builds the Python wheel from source inside a clean Docker container. 2. Installs the wheel into a lightweight, final Docker image. 3. Runs a test script (`get_account_test.py`) that confirms the SDK can be imported and used without any manual environment setup.

resolves: #61