Mercurial > hg > carton
comparison carton.py @ 28:dabf5e1bdf92
version bump
| author | Jeff Hammel <jhammel@mozilla.com> |
|---|---|
| date | Sun, 10 Jul 2011 18:50:49 -0700 |
| parents | dace84448c25 |
| children | 533a4f9718d9 |
comparison
equal
deleted
inserted
replaced
| 27:dace84448c25 | 28:dabf5e1bdf92 |
|---|---|
| 7 To package up all files in a virtualenvs source directory (e.g.): | 7 To package up all files in a virtualenvs source directory (e.g.): |
| 8 | 8 |
| 9 python path/to/carton.py mozmill mozmill/src/* | 9 python path/to/carton.py mozmill mozmill/src/* |
| 10 | 10 |
| 11 This will create a self-extracting file, `mozmill.py`, that will unfold | 11 This will create a self-extracting file, `mozmill.py`, that will unfold |
| 12 a virtualenv | 12 a virtualenv with the specified packages setup for development |
| 13 """ | 13 """ |
| 14 | 14 |
| 15 # imports | 15 # imports |
| 16 import os | 16 import os |
| 17 import sys | 17 import sys |
| 120 | 120 |
| 121 # add virtualenv to the virtualenv (!) | 121 # add virtualenv to the virtualenv (!) |
| 122 virtualenv_dir = os.path.dirname(virtualenv) | 122 virtualenv_dir = os.path.dirname(virtualenv) |
| 123 if os.path.exists(os.path.join(virtualenv_dir, 'setup.py')): | 123 if os.path.exists(os.path.join(virtualenv_dir, 'setup.py')): |
| 124 call([python, 'setup.py', 'install'], cwd=virtualenv_dir, stdout=subprocess.PIPE) | 124 call([python, 'setup.py', 'install'], cwd=virtualenv_dir, stdout=subprocess.PIPE) |
| 125 | |
| 126 | 125 |
| 127 # add carton to the virtualenv (!) | 126 # add carton to the virtualenv (!) |
| 128 if CARTON: | 127 if CARTON: |
| 129 CARTON = CARTON.decode('base64').decode('zlib') | 128 CARTON = CARTON.decode('base64').decode('zlib') |
| 130 carton_filename = os.path.join(scripts_dir, 'carton.py') | 129 carton_filename = os.path.join(scripts_dir, 'carton.py') |
