We love pip and Fabric for Django deployment. You can see our boilerplate fabfile.py here. Pip, however, isn’t safe to run in an automated fashion. If you attempt to switch branches or repos for one of your editable requirements, you’ll be presented with this input:
NAME
yes - output a string repeatedly until killed
SYNOPSIS
yes [STRING]…
yes <span class="caps">OPTION</span>
DESCRIPTION
Repeatedly output a line with all specified <acronym title="s"><span class="caps">STRING</span></acronym>, or `y’.
…</code></pre></figure>
I have the most success with the “wipe” option for pip, so now we can simply run:
yesw|pipinstall-rrequirements.pip
This answers w to any prompt that pip displays, making it much more robust to use in an automated environment.
About the author
Peter Baumgartner
Peter is the founder of Lincoln Loop, having built it up from a small freelance operation in 2007 to what it is today. He is constantly learning and is well-versed in many technical disciplines including devops, …