Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Installing a custom package in the PyApp build #214

Unanswered
gh2023-aesun asked this question in Q&A
Discussion options

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"

    /path/to/my_helpers.whl
    ...
    
  • 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.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /