From 0054aacd637353203e341f017df5669e2440250d Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Mon, 13 Aug 2012 09:10:44 -0400 Subject: [PATCH] Don't check against http URLs. When downloading a Python package from, say, a zipfile using http, pip will report the proper version number, but the requirements file will have a URL, which will cause a mismatch. As an example, consider requirements.txt that contains: https://github.com/dcramer/piplint/zipball/master pip freeze will report: piplint==0.1.1 Running piplint will cause an error: $ piplint requirements.txt Requirement 'https://github.com/dcramer/piplint/zipball/master' not found in virtualenv. You must correct your environment before committing (and running tests). --- src/piplint/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/piplint/__init__.py b/src/piplint/__init__.py index 8f90e3b..e9abd92 100644 --- a/src/piplint/__init__.py +++ b/src/piplint/__init__.py @@ -61,6 +61,8 @@ def is_requirements_line(line): return True if line.startswith('-'): return False + if line.startswith('http://') or line.startswith('https://'): + return False return True