Allow --process-dependency-links in req files

closes #1274
This commit is contained in:
Xavier Fernandez 2015-08-14 13:43:43 +02:00 committed by Xavier Fernandez
parent a7634cb623
commit a9325b0727
3 changed files with 10 additions and 0 deletions

View File

@ -16,6 +16,8 @@
* Allow ``--trusted-host`` within a requirements file. :issue:`2822`.
* Allow ``--process-dependency-links`` within a requirements file. :issue:`1274`.
**7.1.2 (2015-08-22)**

View File

@ -43,6 +43,7 @@ SUPPORTED_OPTIONS = [
cmdoptions.always_unzip,
cmdoptions.no_binary,
cmdoptions.only_binary,
cmdoptions.process_dependency_links,
cmdoptions.trusted_host,
]
@ -219,6 +220,8 @@ def process_line(line, filename, line_number, finder=None, comes_from=None,
if os.path.exists(relative_to_reqs_file):
value = relative_to_reqs_file
finder.find_links.append(value)
if opts.process_dependency_links:
finder.process_dependency_links = True
if opts.trusted_hosts:
finder.secure_origins.extend(
("*", host, "*") for host in opts.trusted_hosts)

View File

@ -293,6 +293,11 @@ class TestProcessLine(object):
call = mock_parse.mock_calls[0]
assert call[1][0] == 'http://me.com/me/reqs.txt'
def test_set_finder_process_dependency_links(self, finder):
list(process_line(
"--process-dependency-links", "file", 1, finder=finder))
assert finder.process_dependency_links
class TestBreakOptionsArgs(object):