Replies: 3 comments
-
I would suggest ASDF. It is far superior to nvm and others. |
Beta Was this translation helpful? Give feedback.
0 replies
-
this is the way how i work with venv version: '3'
vars:
printpy: python -c "import sys; print(sys.executable)"
tasks:
default:
cmds:
- pdm run {{.printpy}}
- task: venv
vars:
content: '{{.printpy}}'
venv:
silent: true
cmds:
- |-
bash << 'eof'
eval $(pdm venv activate)
{{.content}}
eof |
Beta Was this translation helpful? Give feedback.
0 replies
-
Just if someone will end-up here. For venv I come up with pretty simple solution:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are tools like python
virtualenv/venv
or nodenvm
which do not magically work with taskfile by default because they require a shell, and because they modify various environment variables when run, especially PATH.I use both virtualenv and nvm and I have tasks where I need to use particular versions of either nvm or virtualenv, basically activating them at start.
With python virtualenv is relatively ok but with nvm is becomes far more complex, especially as nvm itself is a shell function and not an on disk executable.
I opened this thread so we can investigate how these tools can be used with taskfile and document them, making easier for others to use them. Maybe in the longer run we can even think about what changes we can to to taskfile itself to make it easier to use virtual environment managers (the category of these tools).
Usage examples found so far:
.nvmrc
file and does not allow taskfile to decide which version to activate.Beta Was this translation helpful? Give feedback.
All reactions