[gentoo-user] Source Python virtualenv in OpenRC script
425 views
Skip to first unread message
Julien Roy
unread,
Dec 11, 2021, 7:00:04 PM12/11/21
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello,
I am trying to create an OpenRC script to start a python module.
To launch the module manually, what I would do is:
cd $moduleDir
source bin/activate
python -m $module
How can I integrate this in an OpenRC script? Do I need to write my own start function or is there a built-in way to do this?
Thanks,
Julien
Manuel McLure
unread,
Dec 12, 2021, 5:40:04 PM12/12/21
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
On Sat, Dec 11, 2021 at 3:54 PM Julien Roy <jul...@jroy.ca> wrote:
Hello,
I am trying to create an OpenRC script to start a python module.
To launch the module manually, what I would do is:
cd $moduleDir
source bin/activate
python -m $module
You can actually just use
$moduleDir/bin/python -m $module
Executing anything from the bin directory inside the venv will make it act as if it had activated the venv.
--
Manuel A. McLure WW1FA <man...@mclure.org> <http://www.mclure.org> ...for in Ulthar, according to an ancient and significant law, no man may kill a cat. -- H.P. Lovecraft
Julien Roy
unread,
Dec 12, 2021, 6:00:04 PM12/12/21
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message