Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def fetch_latest_resolvable_version_string(requirement:)
rescue SharedHelpers::HelperSubprocessFailed => e
retry_count ||= 0
retry_count += 1

if compilation_error?(e) && retry_count <= 1
@build_isolation = false
retry
Expand Down Expand Up @@ -216,10 +215,15 @@ def run_command(command, env: python_env)
)
end

def new_resolver_supported?
python_version >= Python::Version.new("3.7")
end

def pip_compile_options(filename)
options = @build_isolation ? ["--build-isolation"] : ["--no-build-isolation"]
options += pip_compile_index_options
options += ["--resolver backtracking", "--allow-unsafe"]
options += ["--allow-unsafe"]
options += ["--resolver backtracking"] if new_resolver_supported?

if (requirements_file = compiled_file_for_filename(filename))
options << "--output-file=#{requirements_file.name}"
Expand Down