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

docs: add python bindings #653

Merged

Conversation

JeanArhancet
Copy link
Contributor

Document Python binding setup with Maturin.

Copy link

@Mizokuiam Mizokuiam left a comment

Choose a reason for hiding this comment

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

wrong pass

@PThorpe92
Copy link
Contributor

PThorpe92 commented Jan 11, 2025

The implementation is clean. Consider adding more error handling...

Your docs throw errors too? I thought I was doing this programming thing all wrong /s

Details

just to be clear dude has been spamming AI nonsense all over, I'm not just being an ass*** ;)

@thisismiller
Copy link
Contributor

[~/ws/limbo (main)]$ pip install maturin
Defaulting to user installation because normal site-packages is not writeable
Collecting maturin
  Downloading maturin-1.8.1-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl.metadata (16 kB)
Downloading maturin-1.8.1-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl (8.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.0/8.0 MB 9.3 MB/s eta 0:00:00
Installing collected packages: maturin
Successfully installed maturin-1.8.1
[~/ws/limbo (main)]$ cd bindings/python/
[~/ws/limbo/bindings/python (main)]$ maturin develop
💥 maturin failed
  Caused by: Couldn't find a virtualenv or conda environment, but you need one to use this command. For maturin to find your virtualenv you need to either set VIRTUAL_ENV (through activate), set CONDA_PREFIX (through conda activate) or have a virtualenv called .venv in the current or any parent folder. See https://virtualenv.pypa.io/en/latest/index.html on how to use virtualenv or use `maturin build` and `pip install <path/to/wheel>` instead.

So if you could throw the obligatory

[~/ws/limbo (main)]$ python -m venv venv && source venv/bin/activate

That'd be great. Assuming that the git root is the right level to create the venv at. And that maturin actually needs it activated.

But I can cargo build again now. Thanks!

@penberg penberg closed this in 481bd17 Jan 13, 2025
@penberg penberg merged commit 481bd17 into tursodatabase:main Jan 13, 2025
37 checks passed
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.

5 participants