Fix install_user_requirements
from __future__ import (
absolute_import, division, print_function, unicode_literals)
+import itertools
import json
import logging
import os
@@ -253,8 +254,9 @@ class Virtualenv(PythonEnvironment):
builder_class = get_builder_class(self.project.documentation_type)
docs_dir = (builder_class(build_env=self.build_env, python_env=self)
.docs_dir())
- for path in [docs_dir, '']:
- for req_file in ['pip_requirements.txt', 'requirements.txt']:
+ paths = [docs_dir, '']
+ req_files = ['pip_requirements.txt', 'requirements.txt']
+ for path, req_file in itertools.product(paths, req_files):
test_path = os.path.join(self.checkout_path, path, req_file)
if os.path.exists(test_path):
requirements_file_path = test_path
