Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'release/0.1'

  • Loading branch information...
commit eeba81d9c47a5e091b053256f7939607a87a40ee 2 parents 261be75 + f5abfbe
@flupke flupke authored
Showing with 13 additions and 6 deletions.
  1. +4 −0 README.rst
  2. +9 −6 freezerequirements/__init__.py
View
4 README.rst
@@ -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
--------
View
15 freezerequirements/__init__.py
@@ -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-'
@@ -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:
Please sign in to comment.
Something went wrong with that request. Please try again.