Pyromania helps make venv management straightforward, inspired by virtualenvwrapper. By default, Pyromania will create a venv named venv in the current directory, and:
- Install the latest versions of
pipandwheel. - Includes handy options for switching to the
site-packagesfolder. - Creates pre and post activation hook scripts for additional customization.
- Activating your
venvwill automagically move to your project directory with a default pre-activation hook.
To install the pyro command for all users on your system with sudo escalation:
curl -sS https://raw.githubusercontent.com/FlipperPA/pyromania/main/install-sudo.sh | shAn Ansible role for installation is also available.
To install the pyro command for the current user only:
curl -sS https://raw.githubusercontent.com/FlipperPA/pyromania/main/install.sh | shOptions:
--help,-h: Display the help menu.--delete,-d: Delete the venv.--create,-c: Create the venv without prompting.--packages-p: Change to the venv's site-packages directory.
Examples:
pyro: Lists the venvs currently managed by pyromania.pyro my_venv: Activate a venv calledmy_venv, or prompts to create it if it doesn't exist.pyro my_venv -c: Creates a venv calledmy_venvwithout prompting.pyro my_venv --delete: Deletes a venv calledmy_venv.pyro my_venv -p: Change to to the venv's site-packages directory.
VENV_DIR(default:venv): default venv directory name.VENV_PYTHON(default:python3): the default version of Python to include.
Pyromania will create two hook files in your venv which can be modified for pre and post activation actions:
venv/pre_activate.sh: script is run before thevenvis activated.venv/post_activate.sh: script is run after thevenvis activated.