# HG changeset patch # User Jeff Hammel # Date 1334004256 25200 # Node ID 99c610473c1740cefc19105a8fe2ef4a38b7cb3d # Parent 33e5d444ff308aa5e56d1f5d1ad46e92a9b7ee4b if develop fails, go with install diff -r 33e5d444ff30 -r 99c610473c17 carton.py --- a/carton.py Mon Apr 09 13:20:05 2012 -0700 +++ b/carton.py Mon Apr 09 13:44:16 2012 -0700 @@ -5,7 +5,7 @@ To package up all files in a virtualenvs source directory (e.g.):: - python path/to/carton.py myproject project/src/* + python path/to/carton.py myproject project/src/* This will create a self-extracting file, `myproject.py`, that will unfold a virtualenv with the specified packages setup for development @@ -137,7 +137,10 @@ continue subdir = os.path.join(srcdir, i) if os.path.exists(os.path.join(srcdir, i, 'setup.py')): - call([python, 'setup.py', 'develop'], cwd=subdir) + try: + call([python, 'setup.py', 'develop'], cwd=subdir) + except: + call([python, 'setup.py', 'install'], cwd=subdir) # TODO: try `setup.py install` if develop fails for distutils packages setup_pys.add(i)