/machoGrande

Blending of virtualevnwrapper, pipenv, and cookiecutter

Primary LanguagePython

machoGrande

This is a Python project generation tool. It leverages:

  • virtualenvwrapper
  • pipenv
  • cookiecutter

layout

machoGrande is laid out as follows:

  1. machoGrande/ virtual environment
  2. -machoGrande/ project, including this file
  3. -ccs/ cookiecutter collection
  4. -cookiecutter-pybase/ initial python project
  5. -{{cookiecutter.slug}} templated content to propagate

conops

  1. edit machoGrande/machoGrande/machoGrande.yaml as needed
  2. exit machoGrande/machoGrande/machoGrande.py
    • creates project directory in VIRTUALENV_HOME
    • invoke pipenv
    • adjust its content to the desired directory
    • isntantiate cookiecutter-pybase with cookiecutter
    • check in the initial content to git

installation

arch

pacman -S python-pip python-pipenv python-virtualenvwrapper

gentoo

non-distro specific

pip install –upgrade pip

cat <<EOF >> ~/.bashrc PDIR=”~/proj/” export WORKON_HOME=”${PDIR}” source /usr/bin/virtualenvwrapper.sh EOF

When you source .bashrc, you get a dozen files, that both clutter ${PDIR} and encroach on your project namespace. But you know where they are. ${PIDR}premkproject ${PIDR}postmkproject ${PIDR}initialize ${PIDR}premkvirtualenv ${PIDR}postmkvirtualenv ${PIDR}prermvirtualenv ${PIDR}postrmvirtualenv ${PIDR}predeactivate ${PIDR}postdeactivate ${PIDR}preactivate ${PIDR}postactivate ${PIDR}get_env_details

pip install cookiecutter

mkdir /home/smitty/proj/machoGrande cd /home/smitty/proj/machoGrande git clone https://github.com/smitty1eGH/machoGrande.git