Open LaurentBergeron opened 2 years ago
How do you ensure using the right directory though?
I'm not sure on the details, but would it be possible to register the tasks package in the virtual environment?
I have faced this issue in the past and shiv comes handy. This is a Python project that lets you package you Python requirements in an executable zipfile.
You will need to package your tasks.py as a Python package and let know the Shiv the --console-script
. This works well as long as you don't have non binary modules.
Invokes needs a "tasks" module or package definition, so it makes sense that it should only run from the project's root directory.
My goal is to be able to use Invoke from any directory on my PC. I would need to activate a virtual environment first, of course.
Is this possible?