[WIP] pypi: cut out pipgrip
Signed-off-by: William Woodruff <william@yossarian.net>
This commit is contained in:
parent
23a89d9263
commit
ab7af6355d
@ -212,11 +212,11 @@ module PyPI
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ensure_formula_installed!("pipgrip")
|
ensure_formula_installed!("python")
|
||||||
|
|
||||||
ohai "Retrieving PyPI dependencies for \"#{input_packages.join(" ")}\"..." if !print_only && !silent
|
ohai "Retrieving PyPI dependencies for \"#{input_packages.join(" ")}\"..." if !print_only && !silent
|
||||||
command =
|
command =
|
||||||
[Formula["pipgrip"].opt_bin/"pipgrip", "--json", "--tree", "--no-cache-dir", *input_packages.map(&:to_s)]
|
[Formula["python"].bin/"python", "-m", "pip", "install", "-q", "--dry-run", "--ignore-installed", "--report", "/dev/stdout", *input_packages.map(&:to_s)]
|
||||||
pipgrip_output = Utils.popen_read(*command)
|
pipgrip_output = Utils.popen_read(*command)
|
||||||
unless $CHILD_STATUS.success?
|
unless $CHILD_STATUS.success?
|
||||||
odie <<~EOS
|
odie <<~EOS
|
||||||
@ -284,6 +284,10 @@ module PyPI
|
|||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.normalize_python_package(name)
|
||||||
|
name.gsub(/[-_.]+/, "-").downcase
|
||||||
|
end
|
||||||
|
|
||||||
def self.json_to_packages(json_tree, main_package, exclude_packages)
|
def self.json_to_packages(json_tree, main_package, exclude_packages)
|
||||||
return [] if json_tree.blank?
|
return [] if json_tree.blank?
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user