Skip to content

docs: add information about PYTHONPATH - #39

Merged
zshipko merged 2 commits into
mainfrom
docs-pythonpath
Dec 31, 2024
Merged

docs: add information about PYTHONPATH#39
zshipko merged 2 commits into
mainfrom
docs-pythonpath

Conversation

@zshipko

@zshipko zshipko commented Dec 31, 2024

Copy link
Copy Markdown

No description provided.

@zshipko
zshipko requested review from G4Vi and nilslice December 31, 2024 19:20
@zshipko
zshipko requested a review from bhelx as a code owner December 31, 2024 19:20

@G4Vi G4Vi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, good idea to document this!

Comment thread README.md
And then point `extism-py` to the dependencies

```bash
$ PYTHONPATH=./deps/lib/python3.12/site-packages extism-py -o a.wasm plugin.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is there a generally easy way to get ./deps/lib/python3.12/site-packages from some CLI command we can recommend the user calls here, or is this just "cd around the locals ./deps directory for where your site-packages is?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good call, I think this works:

 PYTHONPATH=$(python3 -c "import sys; print(sys.path[-1])") extism-py -o a.wasm plugin.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice! thank you

@zshipko
zshipko merged commit dbb276f into main Dec 31, 2024
@zshipko
zshipko deleted the docs-pythonpath branch December 31, 2024 19:56
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.

3 participants