Skip to content

Commit cdfe481

Browse files
committed
ninja: make Python a build dependency
Ninja doesn't actually need Python to build anything. It uses Python only for generating graphs, so there's no point requiring everyone to install Python as well. This is useful for users with non-default prefixes, since this is relocatable but Python is not. It's also useful for CI, because formulae that use Ninja to build will no longer need to install Python as well unless they depend on Python in some other way. Also, remove the Curl dependency, as the test probably still works with system Curl. While we're here, let's install some more useful files from the tarball.
1 parent 70ab49f commit cdfe481

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Formula/ninja.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ class Ninja < Formula
2020
sha256 cellar: :any_skip_relocation, x86_64_linux: "5ec37aa6d5145de2f396926c75891b578883e2a078989969c011548cae2005cf"
2121
end
2222

23-
depends_on "python@3.9"
24-
25-
uses_from_macos "curl" => :test
23+
# Ninja only needs Python for some non-core functionality.
24+
depends_on "python@3.9" => [:build, :test]
2625

2726
def install
2827
py = Formula["python@3.9"].opt_bin/"python3"
@@ -31,6 +30,9 @@ def install
3130
bin.install "ninja"
3231
bash_completion.install "misc/bash-completion" => "ninja-completion.sh"
3332
zsh_completion.install "misc/zsh-completion" => "_ninja"
33+
doc.install "doc/manual.asciidoc"
34+
elisp.install "misc/ninja-mode.el"
35+
(share/"vim/vimfiles/syntax").install "misc/ninja.vim"
3436
end
3537

3638
test do

0 commit comments

Comments
 (0)