deploying a Python application from a PHP developer

Posted by user1218776 on Server Fault See other posts from Server Fault or by user1218776
Published on 2012-07-02T01:58:31Z Indexed on 2012/07/02 3:17 UTC
Read the original article Hit count: 441

Filed under:
|

I'm a little confused on the deployment process for Python. Let's say you

  1. create a brand new project with virtualenv
  2. source bin/activate
  3. pip install a few libraries
  4. write a simple hello world app
  5. pip freeze the dependencies

When I deploy this code into a machine, do I need first make sure the machine is sourced before installing dependencies? I don't mean to sound like a total noob but in the PHP world, I don't have to worry about this because it's already part of the project. All the dependencies are registered with the autoloader in place.

The steps would be:

  1. rsync the files (or any other method)
  2. source bin/activate
  3. pip install the dependencies from the pip freeze output file

It feels awkward, or just wrong and very error prone. What are the correct steps to make? I've searched around but it seems many tutorials/articles make an assumption that anyone reading the article has past python experience (imo).

© Server Fault or respective owner

Related posts about python

Related posts about software-deployment