How do I execute a script at installation time to configure environment variables? #3164
-
How do I execute a script at installation time to configure environment variables?(when i use |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
For example, my program needs to execute some scripts to initialize at install time . |
Beta Was this translation helpful? Give feedback.
-
The "executing arbitrary scripts at install time" use case is not supported by the combination of You might have some luck if you package your project in a OS-specific way (e.g. deb, rpm, nix, etc...). Otherwise you can try to:
|
Beta Was this translation helpful? Give feedback.
The "executing arbitrary scripts at install time" use case is not supported by the combination of
setuptools
+pip
.You might have some luck if you package your project in a OS-specific way (e.g. deb, rpm, nix, etc...).
Otherwise you can try to:
mypackage ensureenv
),(this approach is adopted by pipx)
.bashrc/.zshrc/...
e.g.
source "$(mypackage init --bashrc)"
oreval "$(mypackage init --bashrc)"
,(this approach is adopted by pyenv)
(pyenv also offer this approach as an alternative)