Fabric deploy script `docs/patterns/fabric.rst` does not work (for me) #107

Closed
eugenkiss opened this Issue Aug 19, 2010 · 2 comments

4 participants

@eugenkiss

I was trying to get deployment with fabric and distribute done like explained in the docs. However the deployment script always aborted with this error message

warning: manifest_maker: standard file 'setup.py' not found

So I tried for hours to find the problem and it seems that I have found it (although it is possible that the documented script works fine on other installations - I can only talk about my).

This is how the source code looks in the deploy function right now:

#...
with cd('/tmp/yourapplication'):
    run('tar xzf /tmp/yourapplication.tar.gz')
# now setup the package with our virtual environment's
# python interpreter
run('/var/www/yourapplication/env/bin/python setup.py install')
#...

I had to change it like this to make the script work:

#...
with cd('/tmp/yourapplication'):
    run('tar xzf /tmp/yourapplication.tar.gz')
# You have to be inside the folder where 'setup.py' resides
# in order to make it work
with cd('/tmp/yourapplication/%s' % dist):
    # now setup the package with our virtual environment's
    # python interpreter
    run('/var/www/yourapplication/env/bin/python setup.py install')
#...

Plus I changed run('mkdir /tmp/yourapplication') to run('mkdir -p /tmp/yourapplication') because after a failed deployment the dir has not been removed and the next deployment attempt prematurely ended "because the directory already existed"

@euphoria

I was seeing these same issues, and this change worked for me.

@untitaker
The Pallets Projects member

This is already fixed in master with c6e4d74.

@DasIch DasIch closed this Jul 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment