Skip to content
Snippets Groups Projects
Commit b1d9169a authored by Tim D. Smith's avatar Tim D. Smith
Browse files

language/python: add package_available? helper


Add helper to check whether a module is importable.

Closes Homebrew/homebrew#37345.

Signed-off-by: default avatarTim D. Smith <git@tim-smith.us>
parent 67554a73
No related branches found
No related tags found
No related merge requests found
......@@ -92,5 +92,9 @@ module Language
--record=installed.txt
]
end
def self.package_available? python, module_name
quiet_system python, "-c", "import #{module_name}"
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment