Commit 477fef46 authored by André Anjos's avatar André Anjos 💬
Browse files

Improve requirements.txt parsing to accomodate other options

parent 9fa628d7
......@@ -103,6 +103,8 @@ package-c
#package-e #not to be included
package-z
--no-index
-e http://example.com/mypackage-1.0.4.zip
"""
result = load_requirements(stringio(f))
......
......@@ -334,7 +334,7 @@ def load_requirements(f=None):
def readlines(f):
retval = [str(k.strip()) for k in f]
return [k for k in retval if k and k[0] != '#']
return [k for k in retval if k and k[0] not in ('#', '-')]
if f: return readlines(f)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment