Installing a custom package in the PyApp build #214
Unanswered
gh2023-aesun
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a python package (my_project) that imports helper modules from a local custom package (my_helpers). During development I setup a .venv using uv and append the location of the custom package to the pythonpath when the .venv is activated (by modifying .venv/bin/activate and .venv/bin/deactivate). This works fine during development using vscode but I'm having trouble using PyApp to create an executable for my_project.
When I run the my_project executable to create the virtual environment, my_helpers is not in the pip list. If I run my_project (to create the virtual environment), install the my_helpers.whl in the virtual environment and re-run my_project, it executes fine. So I either need to install the .whl at build time or get PyApp to use the input paths of the development .venv.
I've tried:
Installing the my_helpers.whl in the development .venv prior to the cargo build --release
Using a PYAPP_PROJECT_DEPENDENCY_FILE="requirements.txt"
Activating the development .venv prior to running cargo build --release
I'm not sure if this is causing the issue but my PyApp is not in the same folder as my_project, where the development .venv is.
Can someone outline to correct way to include a custom package into the final build please; via a .whl , the pyproject.toml, the dev .venv or any other method?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions