Best practice for unitialized venv #1005
Replies: 1 comment 1 reply
-
You are mostly correct. There are three primary scopes to an installation: system, global, and local. The system scope is often maintained by native package managers. The global scope can be thought of as your home directory and the local being the directory path of your project. Poetry itself needs to be installed and used either in the system or global scope. To automate poetry install with invoke you would need invoke (and the task library) preinstalled to be at that level or higher to install poetry. The only way to really accomplish this more efficiently would be to include invoke with Python or Poetry. I have been aware of this for a while. I went with git hooks to run additional bootstrap the initialization tasks. |
Beta Was this translation helpful? Give feedback.
-
Hi guys, I'm in quite a pickle attempting to move away from
Makefile
and use Invoke for setting up tasks. I have a repo where I want to make it easier for developers to set up the environment and start working with the best tools available, which would translate basically to:Since this is a project aimed at beginner devs, I would like to use Invoke to make it easier for them to execute steps 2 and 3. However, this poses a problem, because Invoke is being declared as a dev dependency (say in a
pyproject.toml
file) and at the same time I'm trying to create a task to download and install Poetry itself:If Invoke is not already installed as a system-wide package, this approach won't work. So far, I can only see two options:
Makefile
again to download Poetry and install dependencies, which seems counterintuitive since I'm aiming to move away fromMakefile
and it also won't work on Windows machines;README.md
or other documentation and might also be a source of more confusion to newcomers.Do you guys see any other possible approach which allows for Invoke to handle everything? Or perhaps a best alternative if not possible?
Beta Was this translation helpful? Give feedback.
All reactions