librelist archives

« back to archive

fabric documentation question

fabric documentation question

From:
John Fries
Date:
2011-10-23 @ 23:40
I'm trying to follow the directions at
http://flask.pocoo.org/docs/patterns/fabric/ to deploy flask using fabric.

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')

However, when I tried to run this I got the follow error:
 /var/www/yourapplication/env/bin/python: can't open file 'setup.py': [Errno
2] No such file or directory

I think this is because the un-tarring operation produces a subdirectory at
/tmp/yourapplication/YourApplication-0.1, so we need to cd into that
directory to run setup.py install.

I think instead of the current doc, maybe it should be something like this
(apologies for crappy formatting):

with cd('/tmp/yourapplication'):
        run('tar xzf /tmp/yourapplication.tar.gz')

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')


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


Does this make sense? If so, where can I make the changes?

Thanks,
John

Re: [flask] fabric documentation question

From:
Simon Sapin
Date:
2011-10-24 @ 07:03
Le 24/10/2011 01:40, John Fries a écrit :
> Does this make sense? If so, where can I make the changes?

Hi,

I have not tried using fabric+tar to deploy, but the source 
documentation is here:
https://github.com/mitsuhiko/flask/tree/master/docs

You can send a pull request.

Regards,
-- 
Simon Sapin