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

Copy full virtual environment to packed charm #1105

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

carlcsaposs-canonical
Copy link
Contributor

Enables charm authors to run charm in virtual environment (by modifying dispatch.sh). Addresses #1077

Create symlink to site-packages for backwards compatability

@carlcsaposs-canonical
Copy link
Contributor Author

carlcsaposs-canonical commented May 18, 2023

Charm authors can use the full virtual environment by modifying dispatch from

#!/bin/sh

JUJU_DISPATCH_PATH="${{JUJU_DISPATCH_PATH:-$0}}" PYTHONPATH=lib:site-packages \\
  exec ./src/charm.py

to something like

#!/bin/sh

JUJU_DISPATCH_PATH="${{JUJU_DISPATCH_PATH:-$0}}" PYTHONPATH=lib \\
  ./venv/bin/python ./src/charm.py

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.

None yet

1 participant