summaryrefslogtreecommitdiff
path: root/pip/commands
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2010-08-31 03:01:03 +0200
committerJannis Leidel <jannis@leidel.info>2010-08-31 03:01:03 +0200
commit2f44bcd39257095676061cbc03693ce9088d2cdb (patch)
treef95705823f0e96a4b0791b865766bf05fe505516 /pip/commands
parenta5785e066ffb8b3067285a42d20ef2d8524539bc (diff)
downloadpip-2f44bcd39257095676061cbc03693ce9088d2cdb.tar.gz
Fixed issue #151 -- When running the install command, bail early if no requirement is given.
Diffstat (limited to 'pip/commands')
-rw-r--r--pip/commands/install.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/pip/commands/install.py b/pip/commands/install.py
index a2efff3f0..efb8483b9 100644
--- a/pip/commands/install.py
+++ b/pip/commands/install.py
@@ -200,11 +200,18 @@ class InstallCommand(Command):
for req in parse_requirements(filename, finder=finder, options=options):
requirement_set.add_requirement(req)
+ if not requirement_set.has_requirements:
+ if options.find_links:
+ raise InstallationError('You must give at least one '
+ 'requirement to %s (maybe you meant "pip install %s"?)'
+ % (self.name, " ".join(options.find_links)))
+ raise InstallationError('You must give at least one '
+ 'requirement to %s (see "pip help install")' % self.name)
+
if (options.use_user_site and
sys.version_info < (2, 6)):
-
raise InstallationError('--user is only supported in Python version 2.6 and newer')
-
+
import setuptools
if (options.use_user_site and
requirement_set.has_editables and