Automated (No Prompt) Deployment with Pip
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:
What to do? (s)witch, (i)gnore, (w)ipe, (b)ackup
At this time, there is an open bug to solve this problem, but thanks to the trusty *nix toolkit, we have an easy workaround. Enter yes. From its manpage:
NAME
yes - output a string repeatedly until killed
SYNOPSIS
yes [STRING]...
yes OPTION
DESCRIPTION
Repeatedly output a line with all specified STRING(s), or `y'.
...
I have the most success with the “wipe” option for pip, so now we can simply run:
yes w | pip install -r requirements.pip
This answers w to any prompt that pip displays, making it much more robust to use in an automated environment.
Comments
Got something to say?
Our Products
Categories
- accessiblity
- code
- company news
- django
- gondola
- open source
- portfolio
- presentation
- pro tip
- review
- screencast
- seo
- software
- subversion
- trailmapping
- wordpress
Archives
- July, 2010
- June, 2010
- May, 2010
- April, 2010
- February, 2010
- December, 2009
- November, 2009
- October, 2009
Elsewhere
What we’ve been up to online
-
I'll be trying to make dinner reservations for folks at #djangocon tonight. Restaurant recommendations in Portland?
Pete, 7 hours, 22 minutes ago -
forked divio/django-cms
Pete, 6 days, 9 hours ago -
Congrats on the new hires @eldarion_team ! Glad to see more growth in Django commercial services.
Pete, 1 week, 4 days ago -
Video: The amazing John Cleese shares his wisdom…
Pete, 1 week, 4 days ago -
Video: The amazing John Cleese shares his wisdom…
Pete, 1 week, 4 days ago -
@caktusgroup Congrats on the new hire! Great to see the growth of other Django development companies.
Pete, 3 weeks, 4 days ago -
Just launched a Flask/App Engine mini-site we've been tinkering on http://emailed-me.appspot.com/
Pete, 1 month, 1 week ago -
created repository Emailed-Me-
Pete, 1 month, 1 week ago -
Our first iPhone development project hit the App Store last week and is already over 1k users! Check them out @takemyspot #iphone #geodjango
Pete, 2 months ago -
Love the new sites! RT @welikesmall: We just launched two new sites. http://post.ly/mGoq
Pete, 2 months ago -
Pro tip: Using pip safely for automated deployment (no more pesky prompts) http://bit.ly/b5zsPa
Pete, 2 months, 1 week ago -
commented on justquick/django-mailfriend
Pete, 2 months, 1 week ago -
RT @unbracketed: Excited to have @mitsuhiko joining us for some work this summer :)
Pete, 2 months, 2 weeks ago -
New blog post: managing supervisord with upstart http://bit.ly/db3p5N
Pete, 2 months, 2 weeks ago -
Troubleshooting OpenID is just like user/password. Except you have 5 of them and and you don't know which one is failing, and 3 login pages
Pete, 2 months, 2 weeks ago


neat !!!! thanks for the tip…