Skip to content

Commit

Permalink
Merge branch 'release/0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
flupke committed Jan 23, 2013
2 parents 261be75 + f5abfbe commit eeba81d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Or from source::

$ sudo ./setup.py install

If you want to use ``--upload`` you also need fabric::

$ sudo pip install fabric

Examples
--------

Expand Down
15 changes: 9 additions & 6 deletions freezerequirements/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
import uuid

from setuptools.package_index import distros_for_filename
from fabric.api import env, run, put
from fabric.contrib.files import exists
try:
from fabric.api import env, run, put
from fabric.contrib.files import exists
fabric_present = True
except ImportError:
fabric_present = False


TEMPFILES_PREFIX = 'freeze-requirements-'
Expand Down Expand Up @@ -48,11 +52,10 @@ def main():
output_dir = tempfile.mkdtemp(prefix=TEMPFILES_PREFIX)
atexit.register(shutil.rmtree, output_dir)

if options.remote_pip and not options.upload:
print 'You must specify --upload to use --remote-pip'
sys.exit(1)

if options.upload:
if not fabric_present:
print 'You need to install fabric to use --upload'
sys.exit(1)
try:
env.host_string, remote_dir = options.upload.split(':', 1)
except ValueError:
Expand Down

0 comments on commit eeba81d

Please sign in to comment.