language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | Homebrew | brew | b23f66982f823037254e5c4822f1ed2f00c6a2f8.json | Improve external command documentation
Extract `brew bundle` and `brew services` docs from their help. Add a
little for `brew cask` until we can think about e.g. merging the
manpages. | Library/Homebrew/utils.rb | @@ -572,3 +572,7 @@ def tap_and_name_comparison
end
end
end
+
+def command_help_lines(path)
+ path.read.lines.grep(/^#:/).map { |line| line.slice(2..-1) }
+end | true |
Other | Homebrew | brew | b23f66982f823037254e5c4822f1ed2f00c6a2f8.json | Improve external command documentation
Extract `brew bundle` and `brew services` docs from their help. Add a
little for `brew cask` until we can think about e.g. merging the
manpages. | docs/Manpage.md | @@ -907,17 +907,137 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
## OFFICIAL EXTERNAL COMMANDS
- * `bundle`:
- Bundler for non-Ruby dependencies from Homebrew:
- <https://github.com/Homebrew/homebrew-bundle>
+ * `bundle` `command`:
- * `cask`:
- Install macOS applications distributed as binaries:
- <https://github.com/caskroom/homebrew-cask>
+ Bundler for non-Ruby dependencies from Homebrew.
- * `services`:
- Integrates Homebrew formulae with macOS's `launchctl`(1) manager:
- <https://github.com/Homebrew/homebrew-services>
+
+
+ `bundle` [`install`] [`-v`|`--verbose`] [`--no-upgrade`] [`--file=``path`|`--global`]:
+
+ Install or upgrade all dependencies in a Brewfile.
+
+
+
+ `brew bundle dump` [`--force`] [`--describe`] [`--file=``path`|`--global`]
+
+ Write all installed casks/formulae/taps into a Brewfile.
+
+
+
+ `brew bundle cleanup` [`--force`] [`--zap`] [`--file=``path`|`--global`]
+
+ Uninstall all dependencies not listed in a Brewfile.
+
+
+
+ `brew bundle check` [`--no-upgrade`] [`--file`=`path`|`--global`]
+
+ Check if all dependencies are installed in a Brewfile.
+
+
+
+ `brew bundle exec` `command`
+
+ Run an external command in an isolated build environment.
+
+
+
+ `brew bundle list` [`--all`|`--brews`|`--casks`|`--taps`|`--mas`] [`--file=``path`|`--global`]
+
+ List all dependencies present in a Brewfile, optionally limiting by types.
+
+ By default, only brew dependencies are output.
+
+
+
+ If `-v` or `--verbose` are passed, print verbose output.
+
+
+
+ If `--no-upgrade` is passed, don't run `brew upgrade` outdated dependencies.
+
+ Note they may still be upgraded by `brew install` if needed.
+
+
+
+ If `--force` is passed, uninstall dependencies or overwrite an existing Brewfile.
+
+
+
+ If `--file=`path is passed, the Brewfile path is set accordingly
+
+ Use `--file=-` to output to console.
+
+
+
+ If `--global` is passed, set Brewfile path to `$HOME/.Brewfile`.
+
+
+
+ If `--describe` is passed, output a description comment above each line.
+
+ This comment will not be output if the dependency does not have a description.
+
+
+
+ If `-h` or `--help` are passed, print this help message and exit.
+
+ Homebrew/homebrew-bundle <https://github.com/Homebrew/homebrew-bundle>
+
+ * `cask` [`--version` | `audit` | `cat` | `cleanup` | `create` | `doctor` | `edit` | `fetch` | `home` | `info`]:
+ Install macOS applications distributed as binaries.
+
+
+ Caskroom/homebrew-cask <https://github.com/caskroom/homebrew-cask>
+
+ * `services` `command`:
+
+ Integrates Homebrew formulae with macOS' `launchctl` manager.
+
+
+
+ [`sudo`] `brew services list`
+
+ List all running services for the current user (or `root`)
+
+
+
+ [`sudo`] `brew services run` `formula|--all`
+
+ Run the service `formula` without starting at login (or boot).
+
+
+
+ [`sudo`] `brew services` `start` `formula|--all`
+
+ Start the service `formula` immediately and register it to launch at login (or `boot`).
+
+
+
+ [`sudo`] `brew services` `stop` `formula|--all`
+
+ Stop the service `formula` immediately and unregister it from launching at login (or `boot`).
+
+
+
+ [`sudo`] `brew services` `restart` `formula|--all`
+
+ Stop (if necessary) and start the service immediately and register it to launch at login (or `boot`).
+
+
+
+ [`sudo`] `brew services` `cleanup`
+
+ Remove all unused services.
+
+
+
+ If `sudo` is passed, operate on `/Library/LaunchDaemons` (started at boot).
+
+ Otherwise, operate on `~/Library/LaunchAgents (started at login)`.
+
+ Homebrew/homebrew-services <https://github.com/Homebrew/homebrew-services>
## CUSTOM EXTERNAL COMMANDS
| true |
Other | Homebrew | brew | b23f66982f823037254e5c4822f1ed2f00c6a2f8.json | Improve external command documentation
Extract `brew bundle` and `brew services` docs from their help. Add a
little for `brew cask` until we can think about e.g. merging the
manpages. | manpages/brew.1 | @@ -930,16 +930,140 @@ If \fB\-\-keep\-tmp\fR is passed, retain the temporary directory containing the
.SH "OFFICIAL EXTERNAL COMMANDS"
.
.TP
-\fBbundle\fR
-Bundler for non\-Ruby dependencies from Homebrew: \fIhttps://github\.com/Homebrew/homebrew\-bundle\fR
+\fBbundle\fR \fIcommand\fR:
+.
+.IP
+Bundler for non\-Ruby dependencies from Homebrew\.
+.
+.IP
+\fBbundle\fR [\fBinstall\fR] [\fB\-v\fR|\fB\-\-verbose\fR] [\fB\-\-no\-upgrade\fR] [\fB\-\-file=\fR\fIpath\fR|\fB\-\-global\fR]:
+.
+.IP
+Install or upgrade all dependencies in a Brewfile\.
+.
+.IP
+\fBbrew bundle dump\fR [\fB\-\-force\fR] [\fB\-\-describe\fR] [\fB\-\-file=\fR\fIpath\fR|\fB\-\-global\fR]
+.
+.IP
+Write all installed casks/formulae/taps into a Brewfile\.
+.
+.IP
+\fBbrew bundle cleanup\fR [\fB\-\-force\fR] [\fB\-\-zap\fR] [\fB\-\-file=\fR\fIpath\fR|\fB\-\-global\fR]
+.
+.IP
+Uninstall all dependencies not listed in a Brewfile\.
+.
+.IP
+\fBbrew bundle check\fR [\fB\-\-no\-upgrade\fR] [\fB\-\-file\fR=\fIpath\fR|\fB\-\-global\fR]
+.
+.IP
+Check if all dependencies are installed in a Brewfile\.
+.
+.IP
+\fBbrew bundle exec\fR \fIcommand\fR
+.
+.IP
+Run an external command in an isolated build environment\.
+.
+.IP
+\fBbrew bundle list\fR [\fB\-\-all\fR|\fB\-\-brews\fR|\fB\-\-casks\fR|\fB\-\-taps\fR|\fB\-\-mas\fR] [\fB\-\-file=\fR\fIpath\fR|\fB\-\-global\fR]
+.
+.IP
+List all dependencies present in a Brewfile, optionally limiting by types\.
+.
+.IP
+By default, only brew dependencies are output\.
+.
+.IP
+If \fB\-v\fR or \fB\-\-verbose\fR are passed, print verbose output\.
+.
+.IP
+If \fB\-\-no\-upgrade\fR is passed, don\'t run \fBbrew upgrade\fR outdated dependencies\.
+.
+.IP
+Note they may still be upgraded by \fBbrew install\fR if needed\.
+.
+.IP
+If \fB\-\-force\fR is passed, uninstall dependencies or overwrite an existing Brewfile\.
+.
+.IP
+If \fB\-\-file=<path>\fR is passed, the Brewfile path is set accordingly
+.
+.IP
+Use \fB\-\-file=\-\fR to output to console\.
+.
+.IP
+If \fB\-\-global\fR is passed, set Brewfile path to \fB$HOME/\.Brewfile\fR\.
+.
+.IP
+If \fB\-\-describe\fR is passed, output a description comment above each line\.
+.
+.IP
+This comment will not be output if the dependency does not have a description\.
+.
+.IP
+If \fB\-h\fR or \fB\-\-help\fR are passed, print this help message and exit\.
+.
+.P
+Homebrew/homebrew\-bundle \fIhttps://github\.com/Homebrew/homebrew\-bundle\fR
.
.TP
-\fBcask\fR
-Install macOS applications distributed as binaries: \fIhttps://github\.com/caskroom/homebrew\-cask\fR
+\fBcask\fR [\fB\-\-version\fR | \fBaudit\fR | \fBcat\fR | \fBcleanup\fR | \fBcreate\fR | \fBdoctor\fR | \fBedit\fR | \fBfetch\fR | \fBhome\fR | \fBinfo\fR]
+Install macOS applications distributed as binaries\.
+.
+.P
+Caskroom/homebrew\-cask \fIhttps://github\.com/caskroom/homebrew\-cask\fR
.
.TP
-\fBservices\fR
-Integrates Homebrew formulae with macOS\'s \fBlaunchctl\fR(1) manager: \fIhttps://github\.com/Homebrew/homebrew\-services\fR
+\fBservices\fR \fIcommand\fR:
+.
+.IP
+Integrates Homebrew formulae with macOS\' \fBlaunchctl\fR manager\.
+.
+.IP
+[\fIsudo\fR] \fBbrew services list\fR
+.
+.IP
+List all running services for the current user (or \fIroot\fR)
+.
+.IP
+[\fIsudo\fR] \fBbrew services run\fR \fIformula|\-\-all\fR
+.
+.IP
+Run the service \fIformula\fR without starting at login (or boot)\.
+.
+.IP
+[\fIsudo\fR] \fBbrew services\fR \fBstart\fR \fIformula|\-\-all\fR
+.
+.IP
+Start the service \fIformula\fR immediately and register it to launch at login (or \fIboot\fR)\.
+.
+.IP
+[\fIsudo\fR] \fBbrew services\fR \fBstop\fR \fIformula|\-\-all\fR
+.
+.IP
+Stop the service \fIformula\fR immediately and unregister it from launching at login (or \fIboot\fR)\.
+.
+.IP
+[\fIsudo\fR] \fBbrew services\fR \fBrestart\fR \fIformula|\-\-all\fR
+.
+.IP
+Stop (if necessary) and start the service immediately and register it to launch at login (or \fIboot\fR)\.
+.
+.IP
+[\fIsudo\fR] \fBbrew services\fR \fBcleanup\fR
+.
+.IP
+Remove all unused services\.
+.
+.IP
+If \fBsudo\fR is passed, operate on \fB/Library/LaunchDaemons\fR (started at boot)\.
+.
+.IP
+Otherwise, operate on \fB~/Library/LaunchAgents (started at login)\fR\.
+.
+.P
+Homebrew/homebrew\-services \fIhttps://github\.com/Homebrew/homebrew\-services\fR
.
.SH "CUSTOM EXTERNAL COMMANDS"
Homebrew, like \fBgit\fR(1), supports external commands\. These are executable scripts that reside somewhere in the \fBPATH\fR, named \fBbrew\-\fR\fIcmdname\fR or \fBbrew\-\fR\fIcmdname\fR\fB\.rb\fR, which can be invoked like \fBbrew\fR \fIcmdname\fR\. This allows you to create your own commands without modifying Homebrew\'s internals\. | true |
Other | Homebrew | brew | 656986153b6be30ed5519a31ab7891253f209da6.json | Stop file ext detection at query param boundaries
This commit improves Homebrew’s extension detector in `cask/lib/hbc/download_strategy.rb` a bit
so that it won’t cross individual URL query param boundaries any
longer:
```
def ext
Pathname.new(@url).extname[/[^?&]+/]
end
``` | Library/Homebrew/cask/lib/hbc/download_strategy.rb | @@ -154,7 +154,7 @@ def referer_args
end
def ext
- Pathname.new(@url).extname[/[^?]+/]
+ Pathname.new(@url).extname[/[^?&]+/]
end
end
| false |
Other | Homebrew | brew | ba830df4e6759c7f3e5c5772484ed28ef6fba3f9.json | Add tests for CurlDownloadStrategy#tarball_path
Sometimes, `brew cask fetch`/`install` fails with an error message
similar to this:
```
==> Downloading https://w3g3a5v6.ssl.hwcdn.net/upload2/game/214692/735
Error: Download failed on Cask 'steamed-hams' with message: Operation
not supported @ rb_sysopen -
/Users/claudia/Documents/dev/brew/var/homebrew/locks/steamed-hams--1.0
.com&Expires=1520937180&Signature=CGmDulxL8pmutKTlCleNTUY%2FyO9Xyl5u9y
VZUE0uWrjadjuz67Jp7zx3H7NEOhSyOhu8nzicEHRBjr3uSoOJzwkLC8LBLKnz%2B2X%2B
iq5m6IdwSVFcLp2Q1Hr2kR7ETn3rF1DIq5o0lHCyzMmyNe5giEKJNW8WF0KXriULhzLTWL
SA3ZTLCIofAdRiiGje1kNYY3C0SBqymQB8CG3ONn5kj7CIGbxrDOq5xI2ZSJdIyPysSX7S
LvEDBw2KdR24q9t1wfjS9LUzelf5TWk6ojj8p9%2FHjl%2Fi%2FVCXNN4o1mW%2FMayy2t
TY1qcC%2FTmqI1ulZS8SNuaSgr9Iys9oDF1%2BPK%2B4Sg==&hwexp=1520937440&hwsi
g=55bc66884b925ef22f8673c33bfcc33b.incomplete.lock
```
To reproduce the issue, check out this branch and run the
`cask/download_strategy` test suite:
```
brew tests --only=cask/download_strategy
```
Or take a real-life example, which would be a Cask whose URL has
**1.** no `.` character anywhere in the URL path itself (outside of
the domain name), **and 2.** at least one query parameter with a `.`
character in it; **and 3.** other query parameters following that
with a combined length of more than 255 characters.
This combination may be uncommon but it exists, especially in
[URLs that change on every visit](https://github.com/caskroom/homebrew-cask/blob/1002d41242216ce7c71597765dc0a86cabd1fcf7/doc/cask_language_reference/stanzas/url.md#urls-that-change-on-every-visit),
for example
[`steamed-hams`](https://github.com/claui/homebrew-cask-games/blob/9d7df499cdc3665ca2c68a555e9ff9826a2200e7/Casks/steamed-hams.rb)
from my `claui/cask-games` tap:
$ brew tap claui/cask-games
$ brew cask fetch steamed-hams
In a nutshell, **URL query strings sometimes look like a very long
file extension to Homebrew,** which it then proceeds to use as a file
name.
In `CurlDownloadStrategy`, Homebrew seems to apply a heuristic to the
cask URL in order to figure out a possibly meaningful file extension.
Sometimes this heuristic produces immensely long file extensions,
especially when there’s a query parameter with a `.` character in it
but not in the URL path itself (outside of the domain name).
Homebrew then believes that everything after the `.` is a file
extension. In one of the later steps, it tries to create a lock file
containing that extension, which fails because HFS+ cannot handle
files whose base file name has more than 255 characters.
One solution would be to improve Homebrew’s extension detector a bit
so that it won’t cross individual URL query param boundaries any
longer. This is done by adding `&` as a stop character:
```
def ext
Pathname.new(@url).extname[/[^?&]+/]
end
```
This appears to fix the issue for most (if not all) practical
purposes. | Library/Homebrew/test/cask/download_strategy_spec.rb | @@ -93,6 +93,66 @@
expect(curl_args.each_cons(2)).to include(["-e", "http://somehost/also"])
end
end
+
+ context "with a file name trailing the URL path" do
+ describe "#tarball_path" do
+ subject { downloader.tarball_path }
+ its(:extname) { is_expected.to eq(".dmg") }
+ end
+ end
+
+ context "with no discernible file name in it" do
+ let(:url) { "http://example.com/download" }
+
+ describe "#tarball_path" do
+ subject { downloader.tarball_path }
+ its(:to_path) { is_expected.to end_with("some-cask--1.2.3.4") }
+ end
+ end
+
+ context "with a file name trailing the first query parameter" do
+ let(:url) { "http://example.com/download?file=cask.zip&a=1" }
+
+ describe "#tarball_path" do
+ subject { downloader.tarball_path }
+ its(:extname) { is_expected.to eq(".zip") }
+ end
+ end
+
+ context "with a file name trailing the second query parameter" do
+ let(:url) { "http://example.com/dl?a=1&file=cask.zip&b=2" }
+
+ describe "#tarball_path" do
+ subject { downloader.tarball_path }
+ its(:extname) { is_expected.to eq(".zip") }
+ end
+ end
+
+ context "with an unusually long query string" do
+ let(:url) do
+ [
+ "https://node49152.ssl.fancycdn.example.com",
+ "/fancycdn/node/49152/file/upload/download",
+ "?cask_class=zf920df",
+ "&cask_group=2348779087242312",
+ "&cask_archive_file_name=cask.zip",
+ "&signature=CGmDulxL8pmutKTlCleNTUY%2FyO9Xyl5u9yVZUE0",
+ "uWrjadjuz67Jp7zx3H7NEOhSyOhu8nzicEHRBjr3uSoOJzwkLC8L",
+ "BLKnz%2B2X%2Biq5m6IdwSVFcLp2Q1Hr2kR7ETn3rF1DIq5o0lHC",
+ "yzMmyNe5giEKJNW8WF0KXriULhzLTWLSA3ZTLCIofAdRiiGje1kN",
+ "YY3C0SBqymQB8CG3ONn5kj7CIGbxrDOq5xI2ZSJdIyPysSX7SLvE",
+ "DBw2KdR24q9t1wfjS9LUzelf5TWk6ojj8p9%2FHjl%2Fi%2FVCXN",
+ "N4o1mW%2FMayy2tTY1qcC%2FTmqI1ulZS8SNuaSgr9Iys9oDF1%2",
+ "BPK%2B4Sg==",
+ ].join("")
+ end
+
+ describe "#tarball_path" do
+ subject { downloader.tarball_path }
+ its(:extname) { is_expected.to eq(".zip") }
+ its("to_path.length") { is_expected.to be_between(0, 255) }
+ end
+ end
end
describe Hbc::CurlPostDownloadStrategy do | false |
Other | Homebrew | brew | 461bb20b7cd72ec8fc23b9b6b6d75ef6cb534624.json | utils/git: use exact format for last_revision_*
Format for oneline can be overridden in user's gitconfig. If that's the
case, last_revision_commit_of_file won't work properly, and because of
that last_revision_of_file won't work at all.
Here's what I was getting when running brew tests:
expected: "6bec2de"
got: "\e[33m6bec2dee633f\e[m"
I have abbrev length set to 12, and oneline formatting is more colorful.
So, instead of relying on overrideable format, it should rather specify
"--format=%h" to get only hash, and speciy --abbrev=7 to force abbrev
length to be 7
After this commit tests are passing for me. | Library/Homebrew/utils/git.rb | @@ -8,9 +8,10 @@ def last_revision_commit_of_file(repo, file, before_commit: nil)
out, = Open3.capture3(
HOMEBREW_SHIMS_PATH/"scm/git", "-C", repo,
- "log", "--oneline", "--max-count=1", *args, "--", file
+ "log", "--format=%h", "--abbrev=7", "--max-count=1",
+ *args, "--", file
)
- out.split(" ").first
+ out.chomp
end
def last_revision_of_file(repo, file, before_commit: nil) | false |
Other | Homebrew | brew | e817bba18d8026b528fb3abb52a9e1a46aaef565.json | upgrade: add HOMEBREW_UPGRADE_CLEANUP variable.
Allow users to specify they want `brew upgrade --cleanup` to always be
run when they run `brew upgrade`. | Library/Homebrew/cmd/upgrade.rb | @@ -3,7 +3,8 @@
#:
#: Options for the `install` command are also valid here.
#:
-#: If `--cleanup` is specified then remove previously installed <formula> version(s).
+#: If `--cleanup` is specified or `HOMEBREW_UPGRADE_CLEANUP` is set then remove
+#: previously installed <formula> version(s).
#:
#: If `--fetch-HEAD` is passed, fetch the upstream repository to detect if
#: the HEAD installation of the formula is outdated. Otherwise, the
@@ -82,7 +83,7 @@ def upgrade
Migrator.migrate_if_needed(f)
begin
upgrade_formula(f)
- next unless ARGV.include?("--cleanup")
+ next if !ARGV.include?("--cleanup") && !ENV["HOMEBREW_UPGRADE_CLEANUP"]
next unless f.installed?
Homebrew::Cleanup.cleanup_formula f
rescue UnsatisfiedRequirements => e | true |
Other | Homebrew | brew | e817bba18d8026b528fb3abb52a9e1a46aaef565.json | upgrade: add HOMEBREW_UPGRADE_CLEANUP variable.
Allow users to specify they want `brew upgrade --cleanup` to always be
run when they run `brew upgrade`. | Library/Homebrew/manpages/brew.1.md.erb | @@ -242,6 +242,9 @@ can take several different forms:
This issue typically occurs when using FileVault or custom SSD
configurations.
+ * `HOMEBREW_UPGRADE_CLEANUP`:
+ If set, `brew upgrade` always assumes `--cleanup` has been passed.
+
* `HOMEBREW_VERBOSE`:
If set, Homebrew always assumes `--verbose` when running commands.
| true |
Other | Homebrew | brew | e817bba18d8026b528fb3abb52a9e1a46aaef565.json | upgrade: add HOMEBREW_UPGRADE_CLEANUP variable.
Allow users to specify they want `brew upgrade --cleanup` to always be
run when they run `brew upgrade`. | docs/Manpage.md | @@ -554,7 +554,8 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
Options for the `install` command are also valid here.
- If `--cleanup` is specified then remove previously installed `formula` version(s).
+ If `--cleanup` is specified or `HOMEBREW_UPGRADE_CLEANUP` is set then remove
+ previously installed `formula` version(s).
If `--fetch-HEAD` is passed, fetch the upstream repository to detect if
the HEAD installation of the formula is outdated. Otherwise, the
@@ -1092,6 +1093,9 @@ can take several different forms:
This issue typically occurs when using FileVault or custom SSD
configurations.
+ * `HOMEBREW_UPGRADE_CLEANUP`:
+ If set, `brew upgrade` always assumes `--cleanup` has been passed.
+
* `HOMEBREW_VERBOSE`:
If set, Homebrew always assumes `--verbose` when running commands.
| true |
Other | Homebrew | brew | e817bba18d8026b528fb3abb52a9e1a46aaef565.json | upgrade: add HOMEBREW_UPGRADE_CLEANUP variable.
Allow users to specify they want `brew upgrade --cleanup` to always be
run when they run `brew upgrade`. | manpages/brew.1 | @@ -570,7 +570,7 @@ Upgrade outdated, unpinned brews (with existing install options)\.
Options for the \fBinstall\fR command are also valid here\.
.
.IP
-If \fB\-\-cleanup\fR is specified then remove previously installed \fIformula\fR version(s)\.
+If \fB\-\-cleanup\fR is specified or \fBHOMEBREW_UPGRADE_CLEANUP\fR is set then remove previously installed \fIformula\fR version(s)\.
.
.IP
If \fB\-\-fetch\-HEAD\fR is passed, fetch the upstream repository to detect if the HEAD installation of the formula is outdated\. Otherwise, the repository\'s HEAD will be checked for updates when a new stable or devel version has been released\.
@@ -1111,6 +1111,10 @@ If set, instructs Homebrew to use \fBHOMEBREW_TEMP\fR as the temporary directory
This issue typically occurs when using FileVault or custom SSD configurations\.
.
.TP
+\fBHOMEBREW_UPGRADE_CLEANUP\fR
+If set, \fBbrew upgrade\fR always assumes \fB\-\-cleanup\fR has been passed\.
+.
+.TP
\fBHOMEBREW_VERBOSE\fR
If set, Homebrew always assumes \fB\-\-verbose\fR when running commands\.
. | true |
Other | Homebrew | brew | 69b9c11ae8dc2dcb6bbc15bf6a841aad707f137e.json | Fix style in `brew create`-generated formulae
- Fix indentation oddities
- Add empty lines where we expect them in submitted formulae | Library/Homebrew/dev-cmd/create.rb | @@ -170,7 +170,7 @@ def template
# Documentation: https://docs.brew.sh/Formula-Cookbook
# http://www.rubydoc.info/github/Homebrew/brew/master/Formula
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
- class #{Formulary.class_s(name)} < Formula
+ class #{Formulary.class_s(name)} < Formula
desc "#{desc}"
homepage "#{homepage}"
<% if head? %>
@@ -182,17 +182,18 @@ class #{Formulary.class_s(name)} < Formula
<% end %>
sha256 "#{sha256}"
<% end %>
- <% if mode == :cmake %>
+ <% if mode == :cmake %>
depends_on "cmake" => :build
<% elsif mode == :meson %>
depends_on "meson" => :build
depends_on "ninja" => :build
<% elsif mode.nil? %>
# depends_on "cmake" => :build
<% end %>
- def install
+
+ def install
# ENV.deparallelize # if your formula fails when building in parallel
- <% if mode == :cmake %>
+ <% if mode == :cmake %>
system "cmake", ".", *std_cmake_args
<% elsif mode == :autotools %>
# Remove unrecognized options if warned by configure
@@ -219,7 +220,8 @@ def install
system "make", "install" # if this fails, try separate make/make install steps
<% end %>
end
- test do
+
+ test do
# `test do` will create, run in and delete a temporary directory.
#
# This test will fail and we won't accept that! For Homebrew/homebrew-core | false |
Other | Homebrew | brew | 371dd7feec38ffda3c140dc0afae1b10fc5311c4.json | Homebrew-and-Python: update binary locations.
Updated to comply with PEP 394:
https://www.python.org/dev/peps/pep-0394/ | docs/Homebrew-and-Python.md | @@ -12,10 +12,11 @@ Homebrew provides formulae to brew 3.x and a more up-to-date Python 2.7.x.
Homebrew provides one formula for Python 3.x (`python`) and another for Python 2.7.x (`python@2`).
The executables are organized as follows so that Python 2 and Python 3 can both be installed without conflict:
-* `python` and `python3` point to Homebrew's Python 3.x (if installed) otherwise the macOS system Python
+* `python3` points to Homebrew's Python 3.x (if installed)
* `python2` points to Homebrew's Python 2.7.x (if installed)
-* `pip` and `pip3` point to Homebrew's Python 3.x's pip (if installed)
-* `pip2` points to Homebrew's Python 2.7.x's pip (if installed)
+* `python` points to Homebrew's Python 2.7.x (if installed) otherwise the macOS system Python. Check out `brew info python` if you wish to add Homebrew's 3.x `python` to your `PATH`.
+* `pip3` points to Homebrew's Python 3.x's pip (if installed)
+* `pip` and `pip2` point to Homebrew's Python 2.7.x's pip (if installed)
([Wondering which one to choose?](https://wiki.python.org/moin/Python2orPython3))
| false |
Other | Homebrew | brew | 718a2112d7b7292c6a6017b4d5bcfd185b68baea.json | rubocop.yml: adjust rules for 0.53.0. | Library/.rubocop.yml | @@ -26,6 +26,9 @@ Layout/CaseIndentation:
Layout/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
+Layout/EndAlignment:
+ EnforcedStyleAlignWith: variable
+
Layout/IndentArray:
EnforcedStyle: special_inside_parentheses
@@ -52,9 +55,6 @@ Lint/AmbiguousBlockAssociation:
Lint/AssignmentInCondition:
Enabled: false
-Lint/EndAlignment:
- EnforcedStyleAlignWith: variable
-
# so many of these in formulae and can't be autocorrected
Lint/ParenthesesAsGroupedExpression:
Enabled: false
@@ -205,7 +205,10 @@ Style/TernaryParentheses:
EnforcedStyle: require_parentheses_when_complex
# makes diffs nicer
-Style/TrailingCommaInLiteral:
+Style/TrailingCommaInArrayLiteral:
+ EnforcedStyleForMultiline: comma
+
+Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArguments:
@@ -215,6 +218,10 @@ Style/TrailingCommaInArguments:
Naming/VariableNumber:
Enabled: false
+# doesn't make sense for Homebrew/brew but does for taps
+Naming/UncommunicativeMethodParamName:
+ Enabled: true
+
Style/WordArray:
MinSize: 4
| true |
Other | Homebrew | brew | 718a2112d7b7292c6a6017b4d5bcfd185b68baea.json | rubocop.yml: adjust rules for 0.53.0. | Library/Homebrew/.rubocop.yml | @@ -68,6 +68,10 @@ Naming/PredicateName:
- 'compat/**/*'
NameWhitelist: is_32_bit?, is_64_bit?
+# f meaning formulae is pretty standard
+Naming/UncommunicativeMethodParamName:
+ Enabled: false
+
Style/BlockDelimiters:
Exclude:
- '**/*_spec.rb' | true |
Other | Homebrew | brew | 36dadbee474cdb80e8a66a410d97179665d2bf64.json | caveats: remove python caveats.
These instructions are currently incorrect and need to be ported to
`python` 3.x and `python@2` formulae. Until then it's better to not have
them than have them be incorrect.
Closes #3890. | Library/Homebrew/caveats.rb | @@ -25,7 +25,6 @@ def caveats
caveats << function_completion_caveats(:zsh)
caveats << function_completion_caveats(:fish)
caveats << plist_caveats
- caveats << python_caveats
caveats << elisp_caveats
caveats.compact.join("\n")
end
@@ -108,53 +107,6 @@ def function_completion_caveats(shell)
end
end
- def python_caveats
- return unless keg
- return unless keg.python_site_packages_installed?
-
- s = nil
- homebrew_site_packages = Language::Python.homebrew_site_packages
- user_site_packages = Language::Python.user_site_packages "python"
- pth_file = user_site_packages/"homebrew.pth"
- instructions = <<~EOS.gsub(/^/, " ")
- mkdir -p #{user_site_packages}
- echo 'import site; site.addsitedir("#{homebrew_site_packages}")' >> #{pth_file}
- EOS
-
- if f.keg_only?
- keg_site_packages = f.opt_prefix/"lib/python2.7/site-packages"
- unless Language::Python.in_sys_path?("python", keg_site_packages)
- s = <<~EOS
- If you need Python to find bindings for this keg-only formula, run:
- echo #{keg_site_packages} >> #{homebrew_site_packages/f.name}.pth
- EOS
- s += instructions unless Language::Python.reads_brewed_pth_files?("python")
- end
- return s
- end
-
- return if Language::Python.reads_brewed_pth_files?("python")
-
- if !Language::Python.in_sys_path?("python", homebrew_site_packages)
- s = <<~EOS
- Python modules have been installed and Homebrew's site-packages is not
- in your Python sys.path, so you will not be able to import the modules
- this formula installed. If you plan to develop with these modules,
- please run:
- EOS
- s += instructions
- elsif keg.python_pth_files_installed?
- s = <<~EOS
- This formula installed .pth files to Homebrew's site-packages and your
- Python isn't configured to process them, so you will not be able to
- import the modules this formula installed. If you plan to develop
- with these modules, please run:
- EOS
- s += instructions
- end
- s
- end
-
def elisp_caveats
return if f.keg_only?
return unless keg | true |
Other | Homebrew | brew | 36dadbee474cdb80e8a66a410d97179665d2bf64.json | caveats: remove python caveats.
These instructions are currently incorrect and need to be ported to
`python` 3.x and `python@2` formulae. Until then it's better to not have
them than have them be incorrect.
Closes #3890. | Library/Homebrew/test/caveats_spec.rb | @@ -201,45 +201,5 @@ def plist
expect(caveats).to include(HOMEBREW_PREFIX/"share/fish/vendor_completions.d")
end
end
-
- context "python caveats" do
- before do
- (f.prefix.resolved_path/"lib/python2.7/site-packages").mkpath
- end
-
- context "when f is not keg_only" do
- let(:f) {
- formula do
- url "foo-1.0"
- end
- }
- let(:caveats) { described_class.new(f).caveats }
- let(:user_site_packages) { Language::Python.user_site_packages("python") }
-
- it "give commands to run when Homebrew's site-packages is not in Python sys.path" do
- expect(caveats).to include("Homebrew's site-packages is not\nin your Python sys.path")
- expect(caveats).to include(user_site_packages)
- expect(caveats).to include("import site")
- end
-
- it "gives commands to run when python pth files are installed" do
- allow(Homebrew).to receive(:_system).and_return(true)
- allow(Dir).to receive(:[]).with(any_args).and_return(["blah.pth"])
- expect(caveats).to include(".pth files to Homebrew's site-packages and your\nPython isn't configured")
- expect(caveats).to include(user_site_packages)
- expect(caveats).to include("import site")
- end
- end
-
- it "gives commands to run when formula is keg_only" do
- f = formula do
- url "foo-1.0"
- keg_only "some reason"
- end
- caveats = described_class.new(f).caveats
- homebrew_site_packages = Language::Python.homebrew_site_packages
- expect(caveats).to include("echo #{f.opt_prefix}/lib/python2.7/site-packages >> #{homebrew_site_packages/f.name}.pth")
- end
- end
end
end | true |
Other | Homebrew | brew | 7603d05d053db11c7a7606d5fc414cee3b23df13.json | cask dsl caveats | Library/Homebrew/cask/lib/hbc/dsl/caveats.rb | @@ -90,7 +90,7 @@ def eval_caveats(&block)
brew cask install java
EOS
- elsif java_version.include?("9") || java_version.include?("+")
+ elsif java_version.include?("10") || java_version.include?("+")
<<~EOS
#{@cask} requires Java #{java_version}. You can install the latest version with
| false |
Other | Homebrew | brew | 11817fe1f7d9abf9960fc42598f13c12699d5889.json | Generalize the regex determining the Xcode version.
The current regex only matches a single digit for each component of the version (e.g. 9.2). This modifies it to match multiple digits in each component, so that e.g. 10.42 will be matched. | Library/Homebrew/os/mac/xcode.rb | @@ -131,7 +131,7 @@ def detect_version
xcodebuild_output = Utils.popen_read(xcodebuild_path, "-version")
next unless $CHILD_STATUS.success?
- xcode_version = xcodebuild_output[/Xcode (\d(\.\d)*)/, 1]
+ xcode_version = xcodebuild_output[/Xcode (\d+(\.\d+)*)/, 1]
return xcode_version if xcode_version
# Xcode 2.x's xcodebuild has a different version string | false |
Other | Homebrew | brew | 4f1a3ee8dca1eb3e8ccfb116a5ffef6a654b8fd6.json | Update Homebrew-and-Python to describe install
I believe the Homebrew-and-Python page could use a description on how to exactly install Python 2.X and 3.X with Homebrew.
The syntax is written to my best knowledge (but likely wrong), please update this so that it is correct. Finding out the correct syntax is what actually motivated me to update this page in the first place. I'm hoping that this will clarify to the community (or at least me) on how to exactly install Python 2.X and 3.X with Homebrew.
Keep up the amazing work! | docs/Homebrew-and-Python.md | @@ -9,7 +9,26 @@ Homebrew provides formulae to brew 3.x and a more up-to-date Python 2.7.x.
**Important:** If you choose to install a Python which isn't either of these two (system Python or brewed Python), the Homebrew team cannot support any breakage that may occur.
## Python 3.x or Python 2.x
-Homebrew provides one formula for Python 2.7.x and another for Python 3.x. The executables are organized as follows so that Python 2 and Python 3 can both be installed without conflict:
+Homebrew provides one formula for Python 2.7.x and another for Python 3.x.
+
+To install Python 3.X with Homebrew:
+
+`brew install python`
+or
+`brew install python3`
+
+To (optionally) install Python 2.X with Homebrew:
+
+`brew install python2`
+or
+`brew install python@2`
+
+For Python 2.X only: if you want to be able to call `python2` from the path, add the following line to your `~/.bash_profile` (or equivalent). For more information, see the formula's caveats.
+
+`export PATH="/usr/local/opt/python@2/libexec/bin:$PATH"`
+
+
+The executables are organized as follows so that Python 2 and Python 3 can both be installed without conflict:
* `python` and `python3` point to Homebrew's Python 3.x (if installed) otherwise the macOS system Python
* `python2` points to Homebrew's Python 2.7.x (if installed)
* `pip` and `pip3` point to Homebrew's Python 3.x's pip (if installed) | false |
Other | Homebrew | brew | 70253f0009ee8095a5d10ee7bdd891f1fe5cc35c.json | Adjust docs and more internal code for Python 3.
Now we have `python` for Python 3 and `python@2` for Python 2 some more
adjustments need to be made. | Library/Homebrew/compat/dependency_collector.rb | @@ -52,11 +52,11 @@ def parse_symbol_spec(spec, tags)
output_deprecation(spec, "open-mpi")
Dependency.new("open-mpi", tags)
when :python, :python2
+ output_deprecation(spec, "python@2")
+ Dependency.new("python@2", tags)
+ when :python3
output_deprecation(spec, "python")
Dependency.new("python", tags)
- when :python3
- output_deprecation(spec, "python3")
- Dependency.new("python3", tags)
when :emacs, :mysql, :perl, :postgresql, :rbenv, :ruby
output_deprecation(spec)
Dependency.new(spec.to_s, tags) | true |
Other | Homebrew | brew | 70253f0009ee8095a5d10ee7bdd891f1fe5cc35c.json | Adjust docs and more internal code for Python 3.
Now we have `python` for Python 3 and `python@2` for Python 2 some more
adjustments need to be made. | Library/Homebrew/compat/requirements.rb | @@ -84,16 +84,16 @@ class PostgresqlRequirement < Requirement
class PythonRequirement < Requirement
fatal true
satisfy do
- odeprecated("PythonRequirement", "'depends_on \"python\"'")
- which "python"
+ odeprecated("PythonRequirement", "'depends_on \"python@2\"'")
+ which "python2"
end
end
class Python3Requirement < Requirement
fatal true
satisfy do
- odeprecated("Python3Requirement", "'depends_on \"python3\"'")
- which "python3"
+ odeprecated("Python3Requirement", "'depends_on \"python\"'")
+ which "python"
end
end
| true |
Other | Homebrew | brew | 70253f0009ee8095a5d10ee7bdd891f1fe5cc35c.json | Adjust docs and more internal code for Python 3.
Now we have `python` for Python 3 and `python@2` for Python 2 some more
adjustments need to be made. | Library/Homebrew/compat/requirements/language_module_requirement.rb | @@ -38,9 +38,9 @@ def the_test
when :perl
["/usr/bin/env", "perl", "-e", "use #{@import_name}"]
when :python
- ["/usr/bin/env", "python", "-c", "import #{@import_name}"]
+ ["/usr/bin/env", "python2", "-c", "import #{@import_name}"]
when :python3
- ["/usr/bin/env", "python3", "-c", "import #{@import_name}"]
+ ["/usr/bin/env", "python", "-c", "import #{@import_name}"]
when :ruby
["/usr/bin/env", "ruby", "-rubygems", "-e", "require '#{@import_name}'"]
end
@@ -51,8 +51,8 @@ def command_line
when :lua then "luarocks-5.2 install"
when :lua51 then "luarocks-5.1 install"
when :perl then "cpan -i"
- when :python then "pip install"
- when :python3 then "pip3 install"
+ when :python then "pip3 install"
+ when :python3 then "pip install"
when :ruby then "gem install"
end
end | true |
Other | Homebrew | brew | 70253f0009ee8095a5d10ee7bdd891f1fe5cc35c.json | Adjust docs and more internal code for Python 3.
Now we have `python` for Python 3 and `python@2` for Python 2 some more
adjustments need to be made. | Library/Homebrew/diagnostic.rb | @@ -934,7 +934,7 @@ def check_for_old_homebrew_share_python_in_path
from your PATH variable.
Python scripts will now install into #{HOMEBREW_PREFIX}/bin.
You can delete anything, except 'Extras', from the #{HOMEBREW_PREFIX}/share/python
- (and #{HOMEBREW_PREFIX}/share/python3) dir and install affected Python packages
+ (and #{HOMEBREW_PREFIX}/share/python@2) dir and install affected Python packages
anew with `pip install --upgrade`.
EOS
end | true |
Other | Homebrew | brew | 70253f0009ee8095a5d10ee7bdd891f1fe5cc35c.json | Adjust docs and more internal code for Python 3.
Now we have `python` for Python 3 and `python@2` for Python 2 some more
adjustments need to be made. | Library/Homebrew/exceptions.rb | @@ -343,8 +343,8 @@ class FormulaAmbiguousPythonError < RuntimeError
def initialize(formula)
super <<~EOS
The version of python to use with the virtualenv in the `#{formula.full_name}` formula
- cannot be guessed automatically. If the simultaneous use of python and python3
- is intentional, please add `:using => "python"` or `:using => "python3"` to
+ cannot be guessed automatically. If the simultaneous use of python and python@2
+ is intentional, please add `:using => "python"` or `:using => "python@2"` to
`virtualenv_install_with_resources` to resolve the ambiguity manually.
EOS
end | true |
Other | Homebrew | brew | 70253f0009ee8095a5d10ee7bdd891f1fe5cc35c.json | Adjust docs and more internal code for Python 3.
Now we have `python` for Python 3 and `python@2` for Python 2 some more
adjustments need to be made. | Library/Homebrew/formula.rb | @@ -2201,12 +2201,12 @@ def go_resource(name, &block)
# # `build.with?` or `build.without? "another_formula"`:
# depends_on "postgresql" if build.without? "sqlite"
#
+ # <pre># Python 3.x if the `--with-python` is given to `brew install example`
+ # depends_on "python3" => :optional</pre>
# <pre># Python 2.7:
- # depends_on "python"</pre>
+ # depends_on "python@2"</pre>
# <pre># Python 2.7 but use system Python where possible
- # depends_on "python" if MacOS.version <= :snow_leopard</pre>
- # <pre># Python 3.x if the `--with-python3` is given to `brew install example`
- # depends_on "python3" => :optional</pre>
+ # depends_on "python@2" if MacOS.version <= :snow_leopard</pre>
def depends_on(dep)
specs.each { |spec| spec.depends_on(dep) }
end | true |
Other | Homebrew | brew | 70253f0009ee8095a5d10ee7bdd891f1fe5cc35c.json | Adjust docs and more internal code for Python 3.
Now we have `python` for Python 3 and `python@2` for Python 2 some more
adjustments need to be made. | Library/Homebrew/language/python.rb | @@ -89,7 +89,7 @@ def self.included(base)
# @param venv_root [Pathname, String] the path to the root of the virtualenv
# (often `libexec/"venv"`)
# @param python [String] which interpreter to use (e.g. "python"
- # or "python3")
+ # or "python2")
# @param formula [Formula] the active Formula
# @return [Virtualenv] a {Virtualenv} instance
def virtualenv_create(venv_root, python = "python", formula = self)
@@ -115,8 +115,8 @@ def virtualenv_create(venv_root, python = "python", formula = self)
# Returns true if a formula option for the specified python is currently
# active or if the specified python is required by the formula. Valid
- # inputs are "python", "python3", :python, and :python3. Note that
- # "with-python", "without-python", "with-python3", and "without-python3"
+ # inputs are "python", "python2", :python, and :python2. Note that
+ # "with-python", "without-python", "with-python@2", and "without-python@2"
# formula options are handled correctly even if not associated with any
# corresponding depends_on statement.
# @api private
@@ -128,16 +128,16 @@ def needs_python?(python)
# Helper method for the common case of installing a Python application.
# Creates a virtualenv in `libexec`, installs all `resource`s defined
# on the formula, and then installs the formula. An options hash may be
- # passed (e.g., :using => "python3") to override the default, guessed
- # formula preference for python or python3, or to resolve an ambiguous
- # case where it's not clear whether python or python3 should be the
+ # passed (e.g., :using => "python") to override the default, guessed
+ # formula preference for python or python2, or to resolve an ambiguous
+ # case where it's not clear whether python or python2 should be the
# default guess.
def virtualenv_install_with_resources(options = {})
python = options[:using]
if python.nil?
- wanted = %w[python python@2 python@3 python3].select { |py| needs_python?(py) }
+ wanted = %w[python python@2 python2 python3].select { |py| needs_python?(py) }
raise FormulaAmbiguousPythonError, self if wanted.size > 1
- python = wanted.first || "python2.7"
+ python = wanted.first || "python"
end
venv = virtualenv_create(libexec, python.delete("@"))
venv.pip_install resources
@@ -154,7 +154,7 @@ class Virtualenv
# @param venv_root [Pathname, String] the path to the root of the
# virtualenv
# @param python [String] which interpreter to use; i.e. "python" or
- # "python3"
+ # "python2"
def initialize(formula, venv_root, python)
@formula = formula
@venv_root = Pathname.new(venv_root)
@@ -180,19 +180,19 @@ def create
end
end
- # Robustify symlinks to survive python3 patch upgrades
+ # Robustify symlinks to survive python patch upgrades
@venv_root.find do |f|
next unless f.symlink?
next unless (rp = f.realpath.to_s).start_with? HOMEBREW_CELLAR
- python = rp.include?("python3") ? "python3" : "python"
+ python = rp.include?("python2") ? "python2" : "python"
new_target = rp.sub %r{#{HOMEBREW_CELLAR}/#{python}/[^/]+}, Formula[python].opt_prefix
f.unlink
f.make_symlink new_target
end
Pathname.glob(@venv_root/"lib/python*/orig-prefix.txt").each do |prefix_file|
prefix_path = prefix_file.read
- python = prefix_path.include?("python3") ? "python3" : "python"
+ python = prefix_path.include?("python2") ? "python2" : "python"
prefix_path.sub! %r{^#{HOMEBREW_CELLAR}/#{python}/[^/]+}, Formula[python].opt_prefix
prefix_file.atomic_write prefix_path
end | true |
Other | Homebrew | brew | 70253f0009ee8095a5d10ee7bdd891f1fe5cc35c.json | Adjust docs and more internal code for Python 3.
Now we have `python` for Python 3 and `python@2` for Python 2 some more
adjustments need to be made. | Library/Homebrew/test/language_module_requirement_spec.rb | @@ -31,10 +31,6 @@
it "does not satisfy invalid dependencies" do
expect(described_class.new(:python, "notapackage")).not_to be_satisfied
end
-
- it "satisfies valid dependencies" do
- expect(described_class.new(:python, "datetime")).to be_satisfied
- end
end
context "when the language is Ruby" do | true |
Other | Homebrew | brew | 70253f0009ee8095a5d10ee7bdd891f1fe5cc35c.json | Adjust docs and more internal code for Python 3.
Now we have `python` for Python 3 and `python@2` for Python 2 some more
adjustments need to be made. | docs/Gems,-Eggs-and-Perl-Modules.md | @@ -11,8 +11,8 @@ Starting with OS X Lion (10.7), you need `sudo` to install to these like
so: `sudo gem install`, `sudo easy_install` or `sudo cpan -i`.
An option to avoid sudo is to use an access control list:
-`chmod +a 'user:YOUR_NAME_HERE allow add_subdirectory,add_file,delete_child,directory_inherit' /Library/Python/2.7/site-packages`,
-for example, will let you add packages to Python 2.7 as yourself. That
+`chmod +a 'user:YOUR_NAME_HERE allow add_subdirectory,add_file,delete_child,directory_inherit' /Library/Python/3.6/site-packages`,
+for example, will let you add packages to Python 3.6 as yourself. That
is probably safer than changing the group ownership of the directory.
### So why was I using sudo?
@@ -29,14 +29,14 @@ Rather than changing the rights on `/Library/Python`, we recommend the
following options:
### With a brewed Python
-Note, `easy_install` is deprecated. We install `pip` (or `pip3` for
-Python 3) along with python/python3.
+Note, `easy_install` is deprecated. We install `pip` (or `pip2` for
+Python 2) along with python/python2.
We set up distutils such that `pip install` will always put modules in
`$(brew --prefix)/lib/pythonX.Y/site-packages` and scripts in
`$(brew --prefix)/share/python`. Therefore, you won’t need sudo!
-Do `brew info python` or `brew info python3` for precise information
+Do `brew info python` or `brew info python@2` for precise information
about the paths. Note, a brewed Python still searches for modules in
`/Library/Python/X.Y/site-packages` and also in
`~/Library/Python/X.Y/lib/python/site-packages`. | true |
Other | Homebrew | brew | 70253f0009ee8095a5d10ee7bdd891f1fe5cc35c.json | Adjust docs and more internal code for Python 3.
Now we have `python` for Python 3 and `python@2` for Python 2 some more
adjustments need to be made. | docs/Homebrew-and-Python.md | @@ -4,33 +4,32 @@ This page describes how Python is handled in Homebrew for users. See [Python for
Homebrew should work with any [CPython](https://stackoverflow.com/questions/2324208/is-there-any-difference-between-cpython-and-python) and defaults to the macOS system Python.
-Homebrew provides formulae to brew a more up-to-date Python 2.7.x and 3.x.
+Homebrew provides formulae to brew 3.x and a more up-to-date Python 2.7.x.
-**Important:** If you choose to install a Python which isn't either of these two (system Python or brewed Python), the Homebrew team can only provide limited support.
+**Important:** If you choose to install a Python which isn't either of these two (system Python or brewed Python), the Homebrew team cannot support any breakage that may occur.
-## Python 2.x or Python 3.x
+## Python 3.x or Python 2.x
Homebrew provides one formula for Python 2.7.x and another for Python 3.x. The executables are organized as follows so that Python 2 and Python 3 can both be installed without conflict:
-* `python` points to the macOS system Python (with no manual PATH modification)
+* `python` and `python3` point to Homebrew's Python 3.x (if installed) otherwise the macOS system Python
* `python2` points to Homebrew's Python 2.7.x (if installed)
-* `python3` points to Homebrew's Python 3.x (if installed)
+* `pip` and `pip3` point to Homebrew's Python 3.x's pip (if installed)
* `pip2` points to Homebrew's Python 2.7.x's pip (if installed)
-* `pip3` points to Homebrew's Python 3.x's pip (if installed)
([Wondering which one to choose?](https://wiki.python.org/moin/Python2orPython3))
## Setuptools, Pip, etc.
-The Python formulae install [pip](http://www.pip-installer.org) (as `pip2` or `pip3`) and [Setuptools](https://pypi.python.org/pypi/setuptools).
+The Python formulae install [pip](http://www.pip-installer.org) (as `pip` or `pip2`) and [Setuptools](https://pypi.python.org/pypi/setuptools).
Setuptools can be updated via pip, without having to re-brew Python:
```sh
-python2 -m pip install --upgrade setuptools
+python -m pip install --upgrade setuptools
```
Similarly, pip can be used to upgrade itself via:
```sh
-python2 -m pip install --upgrade pip
+python -m pip install --upgrade pip
```
### Note on `pip install --user`
@@ -39,7 +38,7 @@ The normal `pip install --user` is disabled for brewed Python. This is because o
A possible workaround (which puts executable scripts in `~/Library/Python/<X>.<Y>/bin`) is:
```sh
-python2 -m pip install --user --install-option="--prefix=" <package-name>
+python -m pip install --user --install-option="--prefix=" <package-name>
```
## `site-packages` and the `PYTHONPATH`
@@ -49,22 +48,20 @@ The `site-packages` is a directory that contains Python modules (especially bind
$(brew --prefix)/lib/pythonX.Y/site-packages
```
-So, for Python 2.7.x, you'll find it at `/usr/local/lib/python2.7/site-packages`.
+So, for Python 3.6.x, you'll find it at `/usr/local/lib/python3.6/site-packages`.
-Python 2.7 also searches for modules in:
+Python 3.6 also searches for modules in:
-- `/Library/Python/2.7/site-packages`
-- `~/Library/Python/2.7/lib/python/site-packages`
+- `/Library/Python/3.6/site-packages`
+- `~/Library/Python/3.6/lib/python/site-packages`
Homebrew's `site-packages` directory is first created if (1) any Homebrew formula with Python bindings are installed, or (2) upon `brew install python`.
### Why here?
The reasoning for this location is to preserve your modules between (minor) upgrades or re-installations of Python. Additionally, Homebrew has a strict policy never to write stuff outside of the `brew --prefix`, so we don't spam your system.
## Homebrew-provided Python bindings
-Some formulae provide Python bindings. Sometimes a `--with-python` or `--with-python3` option has to be passed to `brew install` in order to build the Python bindings. (Check with `brew options <formula>`.)
-
-Homebrew builds bindings against the first `python` (and `python-config`) in your `PATH`. (Check with `which python`).
+Some formulae provide Python bindings. Sometimes a `--with-python` or `--with-python@2` option has to be passed to `brew install` in order to build the Python bindings. (Check with `brew options <formula>`.)
**Warning!** Python may crash (see [Common Issues](Common-Issues.md)) if you `import <module>` from a brewed Python if you ran `brew install <formula_with_python_bindings>` against the system Python. If you decide to switch to the brewed Python, then reinstall all formulae with Python bindings (e.g. `pyside`, `wxwidgets`, `pygtk`, `pygobject`, `opencv`, `vtk` and `boost-python`).
@@ -89,4 +86,4 @@ Homebrew will still install Python modules into Homebrew's `site-packages` and *
Virtualenv has a `--system-site-packages` switch to allow "global" (i.e. Homebrew's) `site-packages` to be accessible from within the virtualenv.
## Why is Homebrew's Python being installed as a dependency?
-Formulae that declare an unconditional dependency on the `"python"` or `"python3"` formulae are bottled against Homebrew's Python 2.7.x or 3.x and require it to be installed.
+Formulae that declare an unconditional dependency on the `"python"` or `"python@2"` formulae are bottled against Homebrew's Python 3.x or 2.7.x and require it to be installed. | true |
Other | Homebrew | brew | 70253f0009ee8095a5d10ee7bdd891f1fe5cc35c.json | Adjust docs and more internal code for Python 3.
Now we have `python` for Python 3 and `python@2` for Python 2 some more
adjustments need to be made. | docs/Python-for-Formula-Authors.md | @@ -16,16 +16,16 @@ Applications should unconditionally bundle all of their Python-language dependen
### Python declarations
+Formulae for apps that require Python 3 **should** declare an unconditional dependency on `"python"`. These apps **must** work with the current Homebrew Python 3.x formula.
+
Applications that are compatible with Python 2 **should** use the Apple-provided system Python in `/usr/bin` on systems that provide Python 2.7. To do this, declare:
```ruby
-depends_on "python" if MacOS.version <= :snow_leopard
+depends_on "python@2" if MacOS.version <= :snow_leopard
```
No explicit Python dependency is needed on recent OS versions since `/usr/bin` is always in `PATH` for Homebrew formulae; on Leopard and older, the `python` in `PATH` is used if it's at least version 2.7, or else Homebrew's Python 2.7.x is installed.
-Formulae for apps that require Python 3 **should** declare an unconditional dependency on `"python3"`. These apps **must** work with the current Homebrew Python 3.x formula.
-
### Installing
Applications should be installed into a Python [virtualenv](https://virtualenv.pypa.io/en/stable/) environment rooted in `libexec`. This prevents the app's Python modules from contaminating the system site-packages and vice versa.
@@ -66,7 +66,7 @@ This is exactly the same as writing:
```ruby
def install
# Create a virtualenv in `libexec`. If your app needs Python 3, make sure that
- # `depends_on "python3"` is declared, and use `virtualenv_create(libexec, "python3")`.
+ # `depends_on "python"` is declared, and use `virtualenv_create(libexec, "python")`.
venv = virtualenv_create(libexec)
# Install all of the resources declared on the formula into the virtualenv.
venv.pip_install resources
@@ -121,9 +121,9 @@ in case you need to do different things for different resources.
## Bindings
-Build bindings with the system Python by default (don't add an option) and they should be usable with any binary-compatible Python. If that isn't the case, it's an upstream bug; [here's some advice for resolving it](http://blog.tim-smith.us/2015/09/python-extension-modules-os-x/).
+To add bindings for Python 3, please add `depends_on "python"`.
-To add bindings for Python 3, please add `depends_on "python3" => :optional` and make the bindings conditional on `build.with?("python3")`.
+Build Python 2 bindings with the system Python by default (don't add an option) and they should be usable with any binary-compatible Python. If that isn't the case, it's an upstream bug; [here's some advice for resolving it](http://blog.tim-smith.us/2015/09/python-extension-modules-os-x/).
### Dependencies
@@ -153,7 +153,9 @@ Sometimes we have to `inreplace` a `Makefile` to use our prefix for the Python b
### Python declarations
-Python 2 libraries do not need a `depends_on "python"` declaration; they will be built with the system Python, but should still be usable with any other Python 2.7. If this is not the case, it is an upstream bug; [here is some advice for resolving it](http://blog.tim-smith.us/2015/09/python-extension-modules-os-x/). Libraries built for Python 3 should include `depends_on "python3"`, which will bottle against Homebrew's Python 3.x. If a library supports both Python 2.x and Python 3.x, the `"python3"` dependency should be `:optional`. Python 2.x libraries must function when they are installed against either the system Python or brewed Python.
+Libraries built for Python 3 should include `depends_on "python"`, which will bottle against Homebrew's Python 3.x. Python 2.x libraries must function when they are installed against either the system Python or brewed Python.
+
+Python 2 libraries do not need a `depends_on "python@2"` declaration; they will be built with the system Python, but should still be usable with any other Python 2.7. If this is not the case, it is an upstream bug; [here is some advice for resolving it](http://blog.tim-smith.us/2015/09/python-extension-modules-os-x/).
### Installing
| true |
Other | Homebrew | brew | 84dda31e82607424b435a60504ffc288f16c6ade.json | Add tests for ENV#clear_sensitive_environment! | Library/Homebrew/extend/ENV.rb | @@ -28,9 +28,9 @@ def with_build_environment
end
def clear_sensitive_environment!
- ENV.each_key do |key|
+ each_key do |key|
next unless /(cookie|key|token|password)/i =~ key
- ENV.delete key
+ delete key
end
end
end | true |
Other | Homebrew | brew | 84dda31e82607424b435a60504ffc288f16c6ade.json | Add tests for ENV#clear_sensitive_environment! | Library/Homebrew/test/ENV_spec.rb | @@ -141,6 +141,20 @@
expect(subject["MAKEFLAGS"]).to eq("-j4")
end
+
+ describe "#clear_sensitive_environment!" do
+ it "removes sensitive environment variables" do
+ subject["SECRET_TOKEN"] = "password"
+ subject.clear_sensitive_environment!
+ expect(subject).not_to include("SECRET_TOKEN")
+ end
+
+ it "leaves non-sensitive environment variables alone" do
+ subject["FOO"] = "bar"
+ subject.clear_sensitive_environment!
+ expect(subject["FOO"]).to eq "bar"
+ end
+ end
end
describe Stdenv do | true |
Other | Homebrew | brew | 09f343d4961c454100c01390761c8ebc153fe594.json | rubocop: Add cop to check `depends_on` order and tests | Library/Homebrew/rubocops.rb | @@ -2,6 +2,7 @@
require_relative "./rubocops/formula_desc_cop"
require_relative "./rubocops/components_order_cop"
require_relative "./rubocops/components_redundancy_cop"
+require_relative "./rubocops/dependency_order_cop"
require_relative "./rubocops/homepage_cop"
require_relative "./rubocops/text_cop"
require_relative "./rubocops/caveats_cop" | true |
Other | Homebrew | brew | 09f343d4961c454100c01390761c8ebc153fe594.json | rubocop: Add cop to check `depends_on` order and tests | Library/Homebrew/rubocops/dependency_order_cop.rb | @@ -0,0 +1,166 @@
+require_relative "./extend/formula_cop"
+
+module RuboCop
+ module Cop
+ module NewFormulaAudit
+ # This cop checks for correct order of `depends_on` in a Formula
+ #
+ # precedence order:
+ # build-time > run-time > normal > recommended > optional
+ class DependencyOrder < FormulaCop
+ def audit_formula(_node, _class_node, _parent_class_node, body_node)
+ check_dependency_nodes_order(body_node)
+ [:devel, :head, :stable].each do |block_name|
+ block = find_block(body_node, block_name)
+ next unless block
+ check_dependency_nodes_order(block.body)
+ end
+ end
+
+ def check_dependency_nodes_order(parent_node)
+ return if parent_node.nil?
+ dependency_nodes = fetch_depends_on_nodes(parent_node)
+ ordered = dependency_nodes.sort { |a, b| sort_by_dependency_name(a, b) }
+ ordered = sort_dependencies_by_type(ordered)
+ sort_conditional_dependencies!(ordered)
+ verify_order_in_source(ordered)
+ end
+
+ # Match all `depends_on` nodes among childnodes of given parent node
+ def fetch_depends_on_nodes(parent_node)
+ parent_node.each_child_node.select { |x| depends_on_node?(x) }
+ end
+
+ def sort_by_dependency_name(a, b)
+ a_name = dependency_name(a)
+ b_name = dependency_name(b)
+ if a_name < b_name
+ -1
+ elsif a_name > b_name
+ 1
+ else
+ 0
+ end
+ end
+
+ # Separate dependencies according to precedence order:
+ # build-time > run-time > normal > recommended > optional
+ def sort_dependencies_by_type(dependency_nodes)
+ ordered = []
+ ordered.concat(dependency_nodes.select { |dep| buildtime_dependency? dep }.to_a)
+ ordered.concat(dependency_nodes.select { |dep| runtime_dependency? dep }.to_a)
+ ordered.concat(dependency_nodes.reject { |dep| negate_normal_dependency? dep }.to_a)
+ ordered.concat(dependency_nodes.select { |dep| recommended_dependency? dep }.to_a)
+ ordered.concat(dependency_nodes.select { |dep| optional_dependency? dep }.to_a)
+ end
+
+ # `depends_on :apple if build.with? "foo"` should always be defined
+ # after `depends_on :foo`
+ # This method reorders dependencies array according to above rule
+ def sort_conditional_dependencies!(ordered)
+ length = ordered.size
+ idx = 0
+ while idx < length
+ idx1, idx2 = nil
+ ordered.each_with_index do |dep, pos|
+ idx = pos+1
+ match_nodes = build_with_dependency_name(dep)
+ idx1 = pos if match_nodes && !match_nodes.empty?
+ next unless idx1
+ idx2 = nil
+ ordered.drop(idx1+1).each_with_index do |dep2, pos2|
+ next unless match_nodes.index(dependency_name(dep2))
+ idx2 = pos2 if idx2.nil? || pos2 > idx2
+ end
+ break if idx2
+ end
+ insert_after!(ordered, idx1, idx2+idx1) if idx2
+ end
+ ordered
+ end
+
+ # Verify actual order of sorted `depends_on` nodes in source code
+ # Else raise RuboCop problem
+ def verify_order_in_source(ordered)
+ ordered.each_with_index do |dependency_node_1, idx|
+ l1 = line_number(dependency_node_1)
+ dependency_node_2 = nil
+ ordered.drop(idx+1).each do |node2|
+ l2 = line_number(node2)
+ dependency_node_2 = node2 if l2 < l1
+ end
+ next unless dependency_node_2
+ @offensive_nodes = [dependency_node_1, dependency_node_2]
+ component_problem dependency_node_1, dependency_node_2
+ end
+ end
+
+ # Node pattern method to match
+ # `depends_on` variants
+ def_node_matcher :depends_on_node?, <<~EOS
+ {(if _ (send nil? :depends_on ...) nil?)
+ (send nil? :depends_on ...)}
+ EOS
+
+ def_node_search :buildtime_dependency?, "(sym :build)"
+
+ def_node_search :recommended_dependency?, "(sym :recommended)"
+
+ def_node_search :runtime_dependency?, "(sym :run)"
+
+ def_node_search :optional_dependency?, "(sym :optional)"
+
+ def_node_search :negate_normal_dependency?, "(sym {:build :recommended :run :optional})"
+
+ # Node pattern method to extract `name` in `depends_on :name`
+ def_node_search :dependency_name_node, <<~EOS
+ {(send nil? :depends_on {(hash (pair $_ _)) $({str sym} _)})
+ (if _ (send nil? :depends_on {(hash (pair $_ _)) $({str sym} _)}) nil?)}
+ EOS
+
+ # Node pattern method to extract `name` in `build.with? :name`
+ def_node_search :build_with_dependency_node, <<~EOS
+ (send (send nil? :build) :with? $({str sym} _))
+ EOS
+
+ def insert_after!(arr, idx1, idx2)
+ arr.insert(idx2+1, arr.delete_at(idx1))
+ end
+
+ def build_with_dependency_name(node)
+ match_nodes = build_with_dependency_node(node)
+ match_nodes = match_nodes.to_a.delete_if(&:nil?)
+ match_nodes.map { |n| string_content(n) } unless match_nodes.empty?
+ end
+
+ def dependency_name(dependency_node)
+ match_node = dependency_name_node(dependency_node).to_a.first
+ string_content(match_node) if match_node
+ end
+
+ def autocorrect(_node)
+ succeeding_node = @offensive_nodes[0]
+ preceding_node = @offensive_nodes[1]
+ lambda do |corrector|
+ reorder_components(corrector, succeeding_node, preceding_node)
+ end
+ end
+
+ private
+
+ def component_problem(c1, c2)
+ offending_node(c1)
+ problem "dependency \"#{dependency_name(c1)}\" (line #{line_number(c1)}) should be put before dependency \"#{dependency_name(c2)}\" (line #{line_number(c2)})"
+ end
+
+ # Reorder two nodes in the source, using the corrector instance in autocorrect method
+ def reorder_components(corrector, node1, node2)
+ indentation = " " * (start_column(node2) - line_start_column(node2))
+ line_breaks = "\n"
+ corrector.insert_before(node2.source_range, node1.source + line_breaks + indentation)
+ corrector.remove(range_with_surrounding_space(range: node1.source_range, side: :left))
+ end
+ end
+ end
+ end
+end | true |
Other | Homebrew | brew | 09f343d4961c454100c01390761c8ebc153fe594.json | rubocop: Add cop to check `depends_on` order and tests | Library/Homebrew/test/rubocops/dependency_order_cop_spec.rb | @@ -0,0 +1,75 @@
+require_relative "../../rubocops/dependency_order_cop"
+
+describe RuboCop::Cop::NewFormulaAudit::DependencyOrder do
+ subject(:cop) { described_class.new }
+
+ context "depends_on" do
+ it "wrong conditional depends_on order" do
+ expect_offense(<<~RUBY)
+ class Foo < Formula
+ homepage "http://example.com"
+ url "http://example.com/foo-1.0.tgz"
+ depends_on "apple" if build.with? "foo"
+ depends_on "foo" => :optional
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dependency "foo" (line 5) should be put before dependency "apple" (line 4)
+ end
+ RUBY
+ end
+
+ it "wrong alphabetical depends_on order" do
+ expect_offense(<<~RUBY)
+ class Foo < Formula
+ homepage "http://example.com"
+ url "http://example.com/foo-1.0.tgz"
+ depends_on "foo"
+ depends_on "bar"
+ ^^^^^^^^^^^^^^^^ dependency "bar" (line 5) should be put before dependency "foo" (line 4)
+ end
+ RUBY
+ end
+
+ it "wrong conditional depends_on order" do
+ expect_offense(<<~RUBY)
+ class Foo < Formula
+ homepage "http://example.com"
+ url "http://example.com/foo-1.0.tgz"
+ head do
+ depends_on "apple" if build.with? "foo"
+ depends_on "bar"
+ ^^^^^^^^^^^^^^^^ dependency "bar" (line 6) should be put before dependency "apple" (line 5)
+ depends_on "foo" => :optional
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dependency "foo" (line 7) should be put before dependency "apple" (line 5)
+ end
+ depends_on "apple" if build.with? "foo"
+ depends_on "foo" => :optional
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dependency "foo" (line 10) should be put before dependency "apple" (line 9)
+ end
+ RUBY
+ end
+ end
+
+ context "autocorrect" do
+ it "wrong conditional depends_on order" do
+ source = <<~EOS
+ class Foo < Formula
+ homepage "http://example.com"
+ url "http://example.com/foo-1.0.tgz"
+ depends_on "apple" if build.with? "foo"
+ depends_on "foo" => :optional
+ end
+ EOS
+
+ correct_source = <<~EOS
+ class Foo < Formula
+ homepage "http://example.com"
+ url "http://example.com/foo-1.0.tgz"
+ depends_on "foo" => :optional
+ depends_on "apple" if build.with? "foo"
+ end
+ EOS
+
+ corrected_source = autocorrect_source(source)
+ expect(corrected_source).to eq(correct_source)
+ end
+ end
+end | true |
Other | Homebrew | brew | db615a419afb99f186fb6df7c859f7538a7524ba.json | dev-cmd/ruby: fix path to dev-cmd/irb and add test | Library/Homebrew/dev-cmd/ruby.rb | @@ -8,6 +8,6 @@ module Homebrew
module_function
def ruby
- exec ENV["HOMEBREW_RUBY_PATH"], "-I#{HOMEBREW_LIBRARY_PATH}", "-rglobal", "-rcmd/irb", *ARGV
+ exec ENV["HOMEBREW_RUBY_PATH"], "-I#{HOMEBREW_LIBRARY_PATH}", "-rglobal", "-rdev-cmd/irb", *ARGV
end
end | true |
Other | Homebrew | brew | db615a419afb99f186fb6df7c859f7538a7524ba.json | dev-cmd/ruby: fix path to dev-cmd/irb and add test | Library/Homebrew/test/dev-cmd/ruby_spec.rb | @@ -0,0 +1,13 @@
+describe "brew ruby", :integration_test do
+ it "executes ruby code with Homebrew's libraries loaded" do
+ expect { brew "ruby", "-e", "exit 0" }
+ .to be_a_success
+ .and not_to_output.to_stdout
+ .and not_to_output.to_stderr
+
+ expect { brew "ruby", "-e", "exit 1" }
+ .to be_a_failure
+ .and not_to_output.to_stdout
+ .and not_to_output.to_stderr
+ end
+end | true |
Other | Homebrew | brew | 2205f62ec672643b845579f8687b0372b256f485.json | irb: add pry support.
Make `brew irb` optionally support `pry`. While doing so, also make it a `dev-cmd`. | Library/Homebrew/dev-cmd/irb.rb | @@ -1,11 +1,9 @@
-#: * `irb` [`--examples`]:
+#: * `irb` [`--examples`] [`--pry`]:
#: Enter the interactive Homebrew Ruby shell.
#:
#: If `--examples` is passed, several examples will be shown.
-
-require "formula"
-require "keg"
-require "irb"
+#: If `--pry` is passed or HOMEBREW_PRY is set, pry will be
+#: used instead of irb.
class Symbol
def f(*args)
@@ -23,17 +21,33 @@ module Homebrew
module_function
def irb
- $LOAD_PATH.unshift("#{HOMEBREW_LIBRARY_PATH}/cask/lib")
- require "hbc"
-
if ARGV.include? "--examples"
puts "'v8'.f # => instance of the v8 formula"
puts ":hub.f.installed?"
puts ":lua.f.methods - 1.methods"
puts ":mpd.f.recursive_dependencies.reject(&:installed?)"
+ return
+ end
+
+ if ARGV.pry?
+ Homebrew.install_gem_setup_path! "pry"
+ require "pry"
+ Pry.config.prompt_name = "brew"
+ else
+ require "irb"
+ end
+
+ require "formula"
+ require "keg"
+
+ $LOAD_PATH.unshift("#{HOMEBREW_LIBRARY_PATH}/cask/lib")
+ require "hbc"
+
+ ohai "Interactive Homebrew Shell"
+ puts "Example commands available with: brew irb --examples"
+ if ARGV.pry?
+ Pry.start
else
- ohai "Interactive Homebrew Shell"
- puts "Example commands available with: brew irb --examples"
IRB.start
end
end | true |
Other | Homebrew | brew | 2205f62ec672643b845579f8687b0372b256f485.json | irb: add pry support.
Make `brew irb` optionally support `pry`. While doing so, also make it a `dev-cmd`. | Library/Homebrew/extend/ARGV.rb | @@ -267,6 +267,10 @@ def fetch_head?
include? "--fetch-HEAD"
end
+ def pry?
+ include?("--pry") || !ENV["HOMEBREW_PRY"].nil?
+ end
+
# eg. `foo -ns -i --bar` has three switches, n, s and i
def switch?(char)
return false if char.length > 1 | true |
Other | Homebrew | brew | 2205f62ec672643b845579f8687b0372b256f485.json | irb: add pry support.
Make `brew irb` optionally support `pry`. While doing so, also make it a `dev-cmd`. | Library/Homebrew/manpages/brew.1.md.erb | @@ -183,6 +183,10 @@ can take several different forms:
*Note:* Homebrew doesn't require permissions for any of the scopes.
+ * `HOMEBREW_INSTALL_BADGE`:
+ Text printed before the installation summary of each successful build.
+ Defaults to the beer emoji.
+
* `HOMEBREW_LOGS`:
If set, Homebrew will use the given directory to store log files.
@@ -220,9 +224,8 @@ can take several different forms:
If set, Homebrew will not use the GitHub API for e.g searches or
fetching relevant issues on a failed install.
- * `HOMEBREW_INSTALL_BADGE`:
- Text printed before the installation summary of each successful build.
- Defaults to the beer emoji.
+ * `HOMEBREW_PRY`:
+ If set, Homebrew will use `pry` for the `brew irb` command.
* `HOMEBREW_SVN`:
When exporting from Subversion, Homebrew will use `HOMEBREW_SVN` if set, | true |
Other | Homebrew | brew | 2205f62ec672643b845579f8687b0372b256f485.json | irb: add pry support.
Make `brew irb` optionally support `pry`. While doing so, also make it a `dev-cmd`. | docs/Manpage.md | @@ -280,11 +280,6 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
If `--git` (or `-g`) is passed, Homebrew will create a Git repository, useful for
creating patches to the software.
- * `irb` [`--examples`]:
- Enter the interactive Homebrew Ruby shell.
-
- If `--examples` is passed, several examples will be shown.
-
* `leaves`:
Show installed formulae that are not dependencies of another installed formula.
@@ -761,6 +756,13 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
* `formula` `formula`:
Display the path where `formula` is located.
+ * `irb` [`--examples`] [`--pry`]:
+ Enter the interactive Homebrew Ruby shell.
+
+ If `--examples` is passed, several examples will be shown.
+ If `--pry` is passed or HOMEBREW_PRY is set, pry will be
+ used instead of irb.
+
* `linkage` [`--test`] [`--reverse`] `formula`:
Checks the library links of an installed formula.
@@ -1029,6 +1031,10 @@ can take several different forms:
*Note:* Homebrew doesn't require permissions for any of the scopes.
+ * `HOMEBREW_INSTALL_BADGE`:
+ Text printed before the installation summary of each successful build.
+ Defaults to the beer emoji.
+
* `HOMEBREW_LOGS`:
If set, Homebrew will use the given directory to store log files.
@@ -1066,9 +1072,8 @@ can take several different forms:
If set, Homebrew will not use the GitHub API for e.g searches or
fetching relevant issues on a failed install.
- * `HOMEBREW_INSTALL_BADGE`:
- Text printed before the installation summary of each successful build.
- Defaults to the beer emoji.
+ * `HOMEBREW_PRY`:
+ If set, Homebrew will use `pry` for the `brew irb` command.
* `HOMEBREW_SVN`:
When exporting from Subversion, Homebrew will use `HOMEBREW_SVN` if set, | true |
Other | Homebrew | brew | 2205f62ec672643b845579f8687b0372b256f485.json | irb: add pry support.
Make `brew irb` optionally support `pry`. While doing so, also make it a `dev-cmd`. | manpages/brew.1 | @@ -291,13 +291,6 @@ If \fB\-\-interactive\fR (or \fB\-i\fR) is passed, download and patch \fIformula
If \fB\-\-git\fR (or \fB\-g\fR) is passed, Homebrew will create a Git repository, useful for creating patches to the software\.
.
.TP
-\fBirb\fR [\fB\-\-examples\fR]
-Enter the interactive Homebrew Ruby shell\.
-.
-.IP
-If \fB\-\-examples\fR is passed, several examples will be shown\.
-.
-.TP
\fBleaves\fR
Show installed formulae that are not dependencies of another installed formula\.
.
@@ -781,6 +774,13 @@ Open \fIformula\fR in the editor\.
Display the path where \fIformula\fR is located\.
.
.TP
+\fBirb\fR [\fB\-\-examples\fR] [\fB\-\-pry\fR]
+Enter the interactive Homebrew Ruby shell\.
+.
+.IP
+If \fB\-\-examples\fR is passed, several examples will be shown\. If \fB\-\-pry\fR is passed or HOMEBREW_PRY is set, pry will be used instead of irb\.
+.
+.TP
\fBlinkage\fR [\fB\-\-test\fR] [\fB\-\-reverse\fR] \fIformula\fR
Checks the library links of an installed formula\.
.
@@ -1048,6 +1048,10 @@ A personal access token for the GitHub API, which you can create at \fIhttps://g
\fINote:\fR Homebrew doesn\'t require permissions for any of the scopes\.
.
.TP
+\fBHOMEBREW_INSTALL_BADGE\fR
+Text printed before the installation summary of each successful build\. Defaults to the beer emoji\.
+.
+.TP
\fBHOMEBREW_LOGS\fR
If set, Homebrew will use the given directory to store log files\.
.
@@ -1089,8 +1093,8 @@ While ensuring your downloads are fully secure, this is likely to cause from\-so
If set, Homebrew will not use the GitHub API for e\.g searches or fetching relevant issues on a failed install\.
.
.TP
-\fBHOMEBREW_INSTALL_BADGE\fR
-Text printed before the installation summary of each successful build\. Defaults to the beer emoji\.
+\fBHOMEBREW_PRY\fR
+If set, Homebrew will use \fBpry\fR for the \fBbrew irb\fR command\.
.
.TP
\fBHOMEBREW_SVN\fR | true |
Other | Homebrew | brew | d4a3fc088f7baddf5a9bb1f9609987ffb4311046.json | travis.yml: fix bundler caching. | .travis.yml | @@ -3,7 +3,7 @@ cache:
directories:
- $HOME/Library/Caches/Homebrew/style
- $HOME/Library/Caches/Homebrew/tests
- - $HOME/Library/Homebrew/vendor/bundle
+ - Library/Homebrew/vendor/bundle
branches:
only:
- master | true |
Other | Homebrew | brew | d4a3fc088f7baddf5a9bb1f9609987ffb4311046.json | travis.yml: fix bundler caching. | Library/Homebrew/dev-cmd/tap-new.rb | @@ -50,8 +50,7 @@ def tap_new
osx_image: xcode9.2
cache:
directories:
- - $HOME/.gem/ruby
- - Library/Homebrew/vendor/bundle
+ - /usr/local/Homebrew/Library/Homebrew/vendor/bundle
branches:
only:
- master | true |
Other | Homebrew | brew | 650d6dbaac625a758881a215a35d8d4a248de5bf.json | _config.yml: use extensionless permalinks. | docs/_config.yml | @@ -12,6 +12,8 @@ plugins:
- jekyll-sitemap
- jekyll-seo-tag
+permalink: :title
+
defaults:
- scope:
path: "" | false |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/Acceptable-Formulae.md | @@ -2,14 +2,14 @@
Some formulae should not go in
[homebrew/core](https://github.com/Homebrew/homebrew-core). But there are
-additional [Interesting Taps and Forks](Interesting-Taps-and-Forks) and anyone can start their
+additional [Interesting Taps and Forks](Interesting-Taps-and-Forks.md) and anyone can start their
own!
### Dupes in `homebrew/core`
We now accept stuff that comes with macOS as long as it uses `keg_only :provided_by_macos` to be keg-only by default.
### Versioned formulae in `homebrew/core`
-We now accept versioned formulae as long as they [meet the requirements](Versions).
+We now accept versioned formulae as long as they [meet the requirements](Versions.md).
### We don’t like tools that upgrade themselves
Software that can upgrade itself does not integrate well with Homebrew's own
@@ -36,7 +36,7 @@ the upstream project. Tarballs are preferred to Git checkouts, and
tarballs should include the version in the filename whenever possible.
We don’t accept software without a tagged version because they regularly break
-due to upstream changes and we can’t provide [bottles](Bottles) for them.
+due to upstream changes and we can’t provide [bottles](Bottles.md) for them.
### Bindings
First check that there is not already a binding available via
@@ -62,7 +62,7 @@ get maintained and partly because we have to draw the line somewhere.
We frown on authors submitting their own work unless it is very popular.
Don’t forget Homebrew is all Git underneath!
-[Maintain your own tap](How-to-Create-and-Maintain-a-Tap) if you have to!
+[Maintain your own tap](How-to-Create-and-Maintain-a-Tap.md) if you have to!
There may be exceptions to these rules in the main repository; we may
include things that don't meet these criteria or reject things that do. | true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/Bottles.md | @@ -8,7 +8,7 @@ If a bottle is available and usable it will be downloaded and poured automatical
Bottles will not be used if the user requests it (see above), if the formula requests it (with `pour_bottle?`), if any options are specified during installation (bottles are all compiled with default options), if the bottle is not up to date (e.g. lacking a checksum) or if the bottle's `cellar` is not `:any` nor equal to the current `HOMEBREW_CELLAR`.
## Creation
-Bottles are created using the [Brew Test Bot](Brew-Test-Bot). This happens mostly when people submit pull requests to Homebrew and the `bottle do` block is updated by maintainers when they `brew pull --bottle` the contents of a pull request. For the Homebrew organisations' taps they are uploaded to and downloaded from [Bintray](https://bintray.com/homebrew).
+Bottles are created using the [Brew Test Bot](Brew-Test-Bot.md). This happens mostly when people submit pull requests to Homebrew and the `bottle do` block is updated by maintainers when they `brew pull --bottle` the contents of a pull request. For the Homebrew organisations' taps they are uploaded to and downloaded from [Bintray](https://bintray.com/homebrew).
By default, bottles will be built for the oldest CPU supported by the OS/architecture you're building for. (That's Core 2 for 64-bit OSs, Core for 32-bit.) This ensures that bottles are compatible with all computers you might distribute them to. If you *really* want your bottles to be optimized for something else, you can pass the `--bottle-arch=` option to build for another architecture - for example, `brew install foo --bottle-arch=penryn`. Just remember that if you build for a newer architecture some of your users might get binaries they can't run and that would be sad!
| true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/Brew-Test-Bot-For-Core-Contributors.md | @@ -5,7 +5,7 @@ If a build has run and passed on `brew test-bot` then it can be used to quickly
There are two types of Jenkins jobs you will interact with:
## [Homebrew Core Pull Requests](https://jenkins.brew.sh/job/Homebrew%20Core/)
-This job automatically builds any pull requests submitted to Homebrew/homebrew-core. On success or failure it updates the pull request status (see more details on the [main Brew Test Bot documentation page](Brew-Test-Bot)). On a successful build it automatically uploads bottles.
+This job automatically builds any pull requests submitted to Homebrew/homebrew-core. On success or failure it updates the pull request status (see more details on the [main Brew Test Bot documentation page](Brew-Test-Bot.md)). On a successful build it automatically uploads bottles.
## [Homebrew Testing](https://jenkins.brew.sh/job/Homebrew%20Testing/)
This job is manually triggered to run [`brew test-bot`](https://github.com/Homebrew/homebrew-test-bot/blob/master/cmd/brew-test-bot.rb) with user-specified parameters. On a successful build it automatically uploads bottles. | true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/Building-Against-Non-Homebrew-Dependencies.md | @@ -8,4 +8,4 @@ As Homebrew became primarily a binary package manager, most users were fulfillin
## Today
-If you wish to build against custom non-Homebrew dependencies that are provided by Homebrew (e.g. a non-Homebrew, non-macOS `ruby`) then you must [create and maintain your own tap](How-to-Create-and-Maintain-a-Tap) as these formulae will not be accepted in Homebrew/homebrew-core. Once you have done that you can specify `env :std` in the formula which will allow a e.g. `which ruby` to access your existing `PATH` variable and allow compilation to link against this Ruby.
+If you wish to build against custom non-Homebrew dependencies that are provided by Homebrew (e.g. a non-Homebrew, non-macOS `ruby`) then you must [create and maintain your own tap](How-to-Create-and-Maintain-a-Tap.md) as these formulae will not be accepted in Homebrew/homebrew-core. Once you have done that you can specify `env :std` in the formula which will allow a e.g. `which ruby` to access your existing `PATH` variable and allow compilation to link against this Ruby. | true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/Common-Issues.md | @@ -121,7 +121,7 @@ To list all files that would be deleted:
Don't follow the advice here but fix by using
`Language::Python.setup_install_args` in the formula as described in
-[Python for Formula Authors](Python-for-Formula-Authors).
+[Python for Formula Authors](Python-for-Formula-Authors.md).
### Upgrading macOS
| true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/External-Commands.md | @@ -44,7 +44,7 @@ Note they are largely untested, and as always, be careful about running untested
### brew-livecheck
Check if there is a new upstream version of a formula.
-See the [`README`](https://github.com/Homebrew/homebrew-livecheck/blob/master/README) for more info and usage.
+See the [`README`](https://github.com/Homebrew/homebrew-livecheck/blob/master/README.md) for more info and usage.
Install using:
| true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/FAQ.md | @@ -76,11 +76,11 @@ the launchctl PATH for _all users_. For earlier versions of macOS, see
[this page](https://developer.apple.com/legacy/library/qa/qa1067/_index.html).
## How do I contribute to Homebrew?
-Read [CONTRIBUTING.md](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING).
+Read [CONTRIBUTING.md](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md).
## Why do you compile everything?
Homebrew provides pre-compiled versions for many formulae. These
-pre-compiled versions are referred to as [bottles](Bottles) and are available
+pre-compiled versions are referred to as [bottles](Bottles.md) and are available
at <https://bintray.com/homebrew/bottles>.
If available, bottled binaries will be used by default except under the
@@ -163,7 +163,7 @@ creating a separate user account especially for use of Homebrew.
## Why isn’t a particular command documented?
-If it’s not in `man brew`, it’s probably an external command. These are documented [here](External-Commands).
+If it’s not in `man brew`, it’s probably an external command. These are documented [here](External-Commands.md).
## Why haven’t you pulled my pull request?
If it’s been a while, bump it with a “bump” comment. Sometimes we miss requests and there are plenty of them. Maybe we were thinking on something. It will encourage consideration. In the meantime if you could rebase the pull request so that it can be cherry-picked more easily we will love you for a long time.
@@ -179,7 +179,7 @@ install <formula>`. If you encounter any issues, run the command with the
into a debugging shell.
If you want your new formula to be part of `homebrew/core` or want
-to learn more about writing formulae, then please read the [Formula Cookbook](Formula-Cookbook).
+to learn more about writing formulae, then please read the [Formula Cookbook](Formula-Cookbook.md).
## Can I install my own stuff to `/usr/local`?
Yes, `brew` is designed to not get in your way so you can use it how you | true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/Formula-Cookbook.md | @@ -29,15 +29,15 @@ Make sure you run `brew update` before you start. This turns your Homebrew insta
Before submitting a new formula make sure your package:
-* meets all our [Acceptable Formulae](Acceptable-Formulae) requirements
+* meets all our [Acceptable Formulae](Acceptable-Formulae.md) requirements
* isn't already in Homebrew (check `brew search <formula>`)
* isn't in another official [Homebrew tap](https://github.com/Homebrew)
* isn't already waiting to be merged (check the [issue tracker](https://github.com/Homebrew/homebrew-core/pulls))
* is still supported by upstream (i.e. doesn't require extensive patching)
* has a stable, tagged version (i.e. not just a GitHub repository with no versions)
* passes all `brew audit --new-formula <formula>` tests.
-Before submitting a new formula make sure you read over our [contribution guidelines](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING).
+Before submitting a new formula make sure you read over our [contribution guidelines](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md).
### Grab the URL
@@ -251,7 +251,7 @@ Check the top of the e.g. `./configure` output. Some configure scripts do not re
### Add a test to the formula
-Add a valid test to the [`test do`](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#test-class_method) block of the formula. This will be run by `brew test foo` and the [Brew Test Bot](Brew-Test-Bot).
+Add a valid test to the [`test do`](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#test-class_method) block of the formula. This will be run by `brew test foo` and the [Brew Test Bot](Brew-Test-Bot.md).
The
[`test do`](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#test-class_method)
@@ -534,7 +534,7 @@ end
### Compiler selection
-Sometimes a package fails to build when using a certain compiler. Since recent [Xcode versions](Xcode) no longer include a GCC compiler we cannot simply force the use of GCC. Instead, the correct way to declare this is the [`fails_with` DSL method](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#fails_with-class_method). A properly constructed [`fails_with`](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#fails_with-class_method) block documents the latest compiler build version known to cause compilation to fail, and the cause of the failure. For example:
+Sometimes a package fails to build when using a certain compiler. Since recent [Xcode versions](Xcode.md) no longer include a GCC compiler we cannot simply force the use of GCC. Instead, the correct way to declare this is the [`fails_with` DSL method](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#fails_with-class_method). A properly constructed [`fails_with`](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#fails_with-class_method) block documents the latest compiler build version known to cause compilation to fail, and the cause of the failure. For example:
```ruby
fails_with :clang do | true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/Homebrew-and-Python.md | @@ -1,6 +1,6 @@
# Python
-This page describes how Python is handled in Homebrew for users. See [Python for Formula Authors](Python-for-Formula-Authors) for advice on writing formulae to install packages written in Python.
+This page describes how Python is handled in Homebrew for users. See [Python for Formula Authors](Python-for-Formula-Authors.md) for advice on writing formulae to install packages written in Python.
Homebrew should work with any [CPython](https://stackoverflow.com/questions/2324208/is-there-any-difference-between-cpython-and-python) and defaults to the macOS system Python.
@@ -66,7 +66,7 @@ Some formulae provide Python bindings. Sometimes a `--with-python` or `--with-py
Homebrew builds bindings against the first `python` (and `python-config`) in your `PATH`. (Check with `which python`).
-**Warning!** Python may crash (see [Common Issues](Common-Issues)) if you `import <module>` from a brewed Python if you ran `brew install <formula_with_python_bindings>` against the system Python. If you decide to switch to the brewed Python, then reinstall all formulae with Python bindings (e.g. `pyside`, `wxwidgets`, `pygtk`, `pygobject`, `opencv`, `vtk` and `boost-python`).
+**Warning!** Python may crash (see [Common Issues](Common-Issues.md)) if you `import <module>` from a brewed Python if you ran `brew install <formula_with_python_bindings>` against the system Python. If you decide to switch to the brewed Python, then reinstall all formulae with Python bindings (e.g. `pyside`, `wxwidgets`, `pygtk`, `pygobject`, `opencv`, `vtk` and `boost-python`).
## Policy for non-brewed Python bindings
These should be installed via `pip install <package>`. To discover, you can use `pip search` or <https://pypi.python.org/pypi>. (**Note:** System Python does not provide `pip`. Follow the [pip documentation](https://pip.readthedocs.io/en/stable/installing/#install-pip) to install it for your system Python if you would like it.) | true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/How-To-Open-a-Homebrew-Pull-Request.md | @@ -34,7 +34,7 @@ To make a new branch and submit it for review, create a GitHub pull request with
1. Check out the `master` branch with `git checkout master`.
2. Retrieve new changes to the `master` branch with `brew update`.
3. Create a new branch from the latest `master` branch with `git checkout -b <YOUR_BRANCH_NAME> origin/master`.
-4. Make your changes. For formulae, use `brew edit` or your favorite text editor, following all the guidelines in the [Formula Cookbook](Formula-Cookbook).
+4. Make your changes. For formulae, use `brew edit` or your favorite text editor, following all the guidelines in the [Formula Cookbook](Formula-Cookbook.md).
* If there's a `bottle do` block in the formula, don't remove or change it; we'll update it when we pull your PR.
5. Test your changes by doing the following, and ensure they all pass without issue. For changed formulae, make sure you do the `brew audit` step while your changed formula is installed.
* `brew tests` | true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/How-to-Create-and-Maintain-a-Tap.md | @@ -27,7 +27,7 @@ If it’s on GitHub, users can install any of your formulae with
file here.
If they want to get your tap without installing any formula at the same time,
-users can add it with the [`brew tap` command](Taps).
+users can add it with the [`brew tap` command](Taps.md).
If it’s on GitHub, they can use `brew tap user/repo`, where `user` is your
GitHub username and `homebrew-repo` your repository.
@@ -51,7 +51,7 @@ Once your tap is installed, Homebrew will update it each time a user runs
## External commands
You can provide your tap users with custom `brew` commands by adding them in a
-`cmd` subdirectory. [Read more on external commands](External-Commands).
+`cmd` subdirectory. [Read more on external commands](External-Commands.md).
See [homebrew/aliases](https://github.com/Homebrew/homebrew-aliases) for an
example of a tap with external commands. | true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/How-to-build-software-outside-Homebrew-with-Homebrew-keg-only-dependencies.md | @@ -2,7 +2,7 @@
## What does "keg-only" mean?
-The [FAQ](FAQ) briefly explains this.
+The [FAQ](FAQ.md) briefly explains this.
As an example:
| true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/Installation.md | @@ -4,7 +4,7 @@ The suggested and easiest way to install Homebrew is on the
[homepage](https://brew.sh).
The standard script installs Homebrew to `/usr/local` so that
-[you don’t need sudo](FAQ) when you
+[you don’t need sudo](FAQ.md) when you
`brew install`. It is a careful script; it can be run even if you have stuff
installed to `/usr/local` already. It tells you exactly what it will do before
it does it too. And you have to confirm everything it will do before it starts.
@@ -39,12 +39,12 @@ mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar
Create a Homebrew installation wherever you extract the tarball. Whichever `brew` command is called is where the packages will be installed. You can use this as you see fit, e.g. a system set of libs in `/usr/local` and tweaked formulae for development in `~/homebrew`.
## Uninstallation
-Uninstallation is documented in the [FAQ](FAQ).
+Uninstallation is documented in the [FAQ](FAQ.md).
<a name="1"><sup>1</sup></a> Not all formulae have CPU or OS requirements, but
you can assume you will have trouble if you don’t conform. Also, you can find
PowerPC and Tiger branches from other users in the fork network. See
-[Interesting Taps and Forks](Interesting-Taps-and-Forks).
+[Interesting Taps and Forks](Interesting-Taps-and-Forks.md).
<a name="2"><sup>2</sup></a> 10.10 or higher is recommended. 10.5–10.9 are
supported on a best-effort basis. For 10.4 see | true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/Maintainer-Guidelines.md | @@ -5,7 +5,7 @@ access** to Homebrew’s repository and help merge the contributions of
others. You may find what is written here interesting, but it’s
definitely not a beginner’s guide.
-Maybe you were looking for the [Formula Cookbook](Formula-Cookbook)?
+Maybe you were looking for the [Formula Cookbook](Formula-Cookbook.md)?
## Quick checklist
@@ -45,7 +45,7 @@ Add other names as aliases as symlinks in `Aliases` in the tap root. Ensure the
name referenced on the homepage is one of these, as it may be different and have
underscores and hyphens and so on.
-We now accept versioned formulae as long as they [meet the requirements](Versions).
+We now accept versioned formulae as long as they [meet the requirements](Versions.md).
### Merging, rebasing, cherry-picking
Merging should be done in the `Homebrew/brew` repository to preserve history & GPG commit signing,
@@ -64,7 +64,7 @@ the commits. Our main branch history should be useful to other people,
not confusing.
### Testing
-We need to at least check that it builds. Use the [Brew Test Bot](Brew-Test-Bot) for this.
+We need to at least check that it builds. Use the [Brew Test Bot](Brew-Test-Bot.md) for this.
Verify the formula works if possible. If you can’t tell (e.g. if it’s a
library) trust the original contributor, it worked for them, so chances are it | true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/New-Maintainer-Checklist.md | @@ -59,6 +59,6 @@ If they accept, follow a few steps to get them set up:
- Invite them to the [`homebrew` private maintainers 1Password](https://homebrew.1password.com/signin)
- Invite them to [Google Analytics](https://analytics.google.com/analytics/web/?authuser=1#management/Settings/a76679469w115400090p120682403/%3Fm.page%3DAccountUsers/)
-After a month-long trial period with no problems make them [owners on the Homebrew GitHub organisation](https://github.com/orgs/Homebrew/people) and add them to [Homebrew's README](https://github.com/Homebrew/brew/edit/master/README). If there are problems, ask them to step down as a maintainer and revoke their access to the above.
+After a month-long trial period with no problems make them [owners on the Homebrew GitHub organisation](https://github.com/orgs/Homebrew/people) and add them to [Homebrew's README](https://github.com/Homebrew/brew/edit/master/README.md). If there are problems, ask them to step down as a maintainer and revoke their access to the above.
Now sit back, relax and let the new maintainers handle more of our contributions. | true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/Node-for-Formula-Authors.md | @@ -82,7 +82,7 @@ In your formula's `install` method, do any installation steps which need to be d
system "npm", "install", *Language::Node.local_npm_install_args
```
-This will install all of your Node modules dependencies to your local build path. You can now continue with your build steps and take care of the installation into the Homebrew `prefix` on your own, following the [general Homebrew formula instructions](Formula-Cookbook).
+This will install all of your Node modules dependencies to your local build path. You can now continue with your build steps and take care of the installation into the Homebrew `prefix` on your own, following the [general Homebrew formula instructions](Formula-Cookbook.md).
## Example
| true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/README.md | @@ -1,46 +1,46 @@
# Documentation
## Users
-- [`brew` man-page (command documentation)](Manpage)
-- [Troubleshooting](Troubleshooting)
-- [Installation](Installation)
-- [Frequently Asked Questions](FAQ)
-- [Common Issues](Common-Issues)
+- [`brew` man-page (command documentation)](Manpage.md)
+- [Troubleshooting](Troubleshooting.md)
+- [Installation](Installation.md)
+- [Frequently Asked Questions](FAQ.md)
+- [Common Issues](Common-Issues.md)
-- [Tips and Tricks](Tips-N'-Tricks)
-- [Bottles (binary packages)](Bottles)
-- [Taps (third-party repositories)](Taps)
-- [Interesting Taps and Forks](Interesting-Taps-and-Forks)
-- [Anonymous Aggregate User Behaviour Analytics](Analytics)
+- [Tips and Tricks](Tips-N'-Tricks.md)
+- [Bottles (binary packages)](Bottles.md)
+- [Taps (third-party repositories)](Taps.md)
+- [Interesting Taps and Forks](Interesting-Taps-and-Forks.md)
+- [Anonymous Aggregate User Behaviour Analytics](Analytics.md)
-- [Querying `brew`](Querying-Brew)
-- [C++ Standard Libraries](C++-Standard-Libraries)
-- [MD5 and SHA-1 Deprecation](Checksum_Deprecation)
-- [Custom GCC and Cross Compilers](Custom-GCC-and-cross-compilers)
-- [External Commands](External-Commands)
-- [Ruby Gems, Python Eggs and Perl Modules](Gems,-Eggs-and-Perl-Modules)
-- [Python](Homebrew-and-Python)
-- [How To Build Software Outside Homebrew With Homebrew `keg_only` dependencies](How-to-build-software-outside-Homebrew-with-Homebrew-keg-only-dependencies)
-- [Xcode](Xcode)
-- [Kickstarter Supporters](Kickstarter-Supporters)
+- [Querying `brew`](Querying-Brew.md)
+- [C++ Standard Libraries](C++-Standard-Libraries.md)
+- [MD5 and SHA-1 Deprecation](Checksum_Deprecation.md)
+- [Custom GCC and Cross Compilers](Custom-GCC-and-cross-compilers.md)
+- [External Commands](External-Commands.md)
+- [Ruby Gems, Python Eggs and Perl Modules](Gems,-Eggs-and-Perl-Modules.md)
+- [Python](Homebrew-and-Python.md)
+- [How To Build Software Outside Homebrew With Homebrew `keg_only` dependencies](How-to-build-software-outside-Homebrew-with-Homebrew-keg-only-dependencies.md)
+- [Xcode](Xcode.md)
+- [Kickstarter Supporters](Kickstarter-Supporters.md)
## Contributors
-- [How To Open A Pull Request (and get it merged)](How-To-Open-a-Homebrew-Pull-Request)
-- [Formula Cookbook](Formula-Cookbook)
-- [Acceptable Formulae](Acceptable-Formulae)
-- [Formulae Versions](Versions)
-- [Node for Formula Authors](Node-for-Formula-Authors)
-- [Python for Formula Authors](Python-for-Formula-Authors)
-- [Migrating A Formula To A Tap](Migrating-A-Formula-To-A-Tap)
-- [Rename A Formula](Rename-A-Formula)
-- [Building Against Non-Homebrew Dependencies](Building-Against-Non-Homebrew-Dependencies)
-- [How To Create (And Maintain) A Tap](How-to-Create-and-Maintain-a-Tap)
-- [Brew Test Bot](Brew-Test-Bot)
-- [Prose Style Guidelines](Prose-Style-Guidelines)
+- [How To Open A Pull Request (and get it merged)](How-To-Open-a-Homebrew-Pull-Request.md)
+- [Formula Cookbook](Formula-Cookbook.md)
+- [Acceptable Formulae](Acceptable-Formulae.md)
+- [Formulae Versions](Versions.md)
+- [Node for Formula Authors](Node-for-Formula-Authors.md)
+- [Python for Formula Authors](Python-for-Formula-Authors.md)
+- [Migrating A Formula To A Tap](Migrating-A-Formula-To-A-Tap.md)
+- [Rename A Formula](Rename-A-Formula.md)
+- [Building Against Non-Homebrew Dependencies](Building-Against-Non-Homebrew-Dependencies.md)
+- [How To Create (And Maintain) A Tap](How-to-Create-and-Maintain-a-Tap.md)
+- [Brew Test Bot](Brew-Test-Bot.md)
+- [Prose Style Guidelines](Prose-Style-Guidelines.md)
## Maintainers
-- [New Maintainer Checklist](New-Maintainer-Checklist)
-- [Maintainers: Avoiding Burnout](Maintainers-Avoiding-Burnout)
-- [Maintainer Guidelines](Maintainer-Guidelines)
-- [Brew Test Bot For Maintainers](Brew-Test-Bot-For-Core-Contributors)
-- [Common Issues for Maintainers](Common-Issues-for-Core-Contributors)
+- [New Maintainer Checklist](New-Maintainer-Checklist.md)
+- [Maintainers: Avoiding Burnout](Maintainers-Avoiding-Burnout.md)
+- [Maintainer Guidelines](Maintainer-Guidelines.md)
+- [Brew Test Bot For Maintainers](Brew-Test-Bot-For-Core-Contributors.md)
+- [Common Issues for Maintainers](Common-Issues-for-Core-Contributors.md) | true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/Tips-N'-Tricks.md | @@ -3,7 +3,7 @@
## Installing previous versions of formulae
The supported method of installing specific versions of
-some formulae is to see if there is a versioned formula (e.g. `gcc@6`) available. If the version you’re looking for isn’t available, consider [opening a pull request](How-To-Open-a-Homebrew-Pull-Request)!
+some formulae is to see if there is a versioned formula (e.g. `gcc@6`) available. If the version you’re looking for isn’t available, consider [opening a pull request](How-To-Open-a-Homebrew-Pull-Request.md)!
### Installing directly from pull requests
You can [browse pull requests](https://github.com/Homebrew/homebrew-core/pulls) | true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/Troubleshooting.md | @@ -12,7 +12,7 @@ Follow these steps to fix common problems:
* Run `brew doctor` and fix all the warnings (**outdated Xcode/CLT and unbrewed dylibs are very likely to cause problems**).
* Check that **Command Line Tools for Xcode (CLT)** and **Xcode** are up to date.
* If commands fail with permissions errors, check the permissions of `/usr/local`'s subdirectories. If you’re unsure what to do, you can run `cd /usr/local && sudo chown -R $(whoami) bin etc include lib sbin share var Frameworks`.
-* Read through the [Common Issues](Common-Issues).
+* Read through the [Common Issues](Common-Issues.md).
## Check to see if the issue has been reported
| true |
Other | Homebrew | brew | 190e665bb1db54d452ed9e0bf93c6985bd8dab5f.json | Revert "docs: use short links."
This reverts commit e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.
Closes #3832. | docs/Versions.md | @@ -18,6 +18,6 @@ Versioned formulae we include in [homebrew/core](https://github.com/homebrew/hom
* Versioned formulae should be as similar as possible and sensible to the unversioned formulae. Creating or updating a versioned formula should be a chance to ask questions of the unversioned formula e.g. can some unused or useless options be removed or made default?
* No more than five versions of a formula (including the non-versioned one) will be supported at any given time, regardless of usage. When removing formulae that violate this we will aim to do so based on usage and support status rather than age.
-Homebrew's versions are not intended to be used for any old versions you personally require for your project. You should create your own [tap](How-to-Create-and-Maintain-a-Tap) for formulae you or your organisation wish to control the versioning of or those that do not meet the above standards. Software that has regular API or ABI breaking releases still needs to meet all the above requirements; that a `brew upgrade` has broken something for you is not an argument for us to add and maintain a formula for you.
+Homebrew's versions are not intended to be used for any old versions you personally require for your project. You should create your own [tap](How-to-Create-and-Maintain-a-Tap.md) for formulae you or your organisation wish to control the versioning of or those that do not meet the above standards. Software that has regular API or ABI breaking releases still needs to meet all the above requirements; that a `brew upgrade` has broken something for you is not an argument for us to add and maintain a formula for you.
We may temporarily add versioned formulae for our own needs that do not meet these standards in [homebrew/core](https://github.com/homebrew/homebrew-core). The presence of a versioned formula there does not imply it will be maintained indefinitely or that we are willing to accept any more versions that do not meet the requirements above. | true |
Other | Homebrew | brew | d05b8522d5f51db5ca2f75fe322848df9b8ff88b.json | README: use docs.brew.sh link. | README.md | @@ -1,7 +1,7 @@
# Homebrew
[](https://github.com/Homebrew/brew/releases)
-Features, usage and installation instructions are [summarised on the homepage](https://brew.sh). Terminology (e.g. the difference between a Cellar, Tap, Cask and so forth) is [explained here](docs/Formula-Cookbook.md#homebrew-terminology).
+Features, usage and installation instructions are [summarised on the homepage](https://brew.sh). Terminology (e.g. the difference between a Cellar, Tap, Cask and so forth) is [explained here](https://docs.brew.sh/Formula-Cookbook#homebrew-terminology).
## What Packages Are Available?
1. Type `brew search` for a list. | false |
Other | Homebrew | brew | a1bf2c072c9d2064f304a1294c51b565e8a81853.json | Use \d instead of 0-9 in regex | Library/Homebrew/system_config.rb | @@ -134,7 +134,7 @@ def describe_java
return "N/A" unless which "java"
java_version = Utils.popen_read("java", "-version")
return "N/A" unless $CHILD_STATUS.success?
- java_version[/java version "([0-9\._]+)"/, 1] || "N/A"
+ java_version[/java version "([\d\._]+)"/, 1] || "N/A"
end
def describe_git | false |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/Acceptable-Formulae.md | @@ -2,14 +2,14 @@
Some formulae should not go in
[homebrew/core](https://github.com/Homebrew/homebrew-core). But there are
-additional [Interesting Taps and Forks](Interesting-Taps-and-Forks.md) and anyone can start their
+additional [Interesting Taps and Forks](Interesting-Taps-and-Forks) and anyone can start their
own!
### Dupes in `homebrew/core`
We now accept stuff that comes with macOS as long as it uses `keg_only :provided_by_macos` to be keg-only by default.
### Versioned formulae in `homebrew/core`
-We now accept versioned formulae as long as they [meet the requirements](Versions.md).
+We now accept versioned formulae as long as they [meet the requirements](Versions).
### We don’t like tools that upgrade themselves
Software that can upgrade itself does not integrate well with Homebrew's own
@@ -36,7 +36,7 @@ the upstream project. Tarballs are preferred to Git checkouts, and
tarballs should include the version in the filename whenever possible.
We don’t accept software without a tagged version because they regularly break
-due to upstream changes and we can’t provide [bottles](Bottles.md) for them.
+due to upstream changes and we can’t provide [bottles](Bottles) for them.
### Bindings
First check that there is not already a binding available via
@@ -62,7 +62,7 @@ get maintained and partly because we have to draw the line somewhere.
We frown on authors submitting their own work unless it is very popular.
Don’t forget Homebrew is all Git underneath!
-[Maintain your own tap](How-to-Create-and-Maintain-a-Tap.md) if you have to!
+[Maintain your own tap](How-to-Create-and-Maintain-a-Tap) if you have to!
There may be exceptions to these rules in the main repository; we may
include things that don't meet these criteria or reject things that do. | true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/Bottles.md | @@ -8,7 +8,7 @@ If a bottle is available and usable it will be downloaded and poured automatical
Bottles will not be used if the user requests it (see above), if the formula requests it (with `pour_bottle?`), if any options are specified during installation (bottles are all compiled with default options), if the bottle is not up to date (e.g. lacking a checksum) or if the bottle's `cellar` is not `:any` nor equal to the current `HOMEBREW_CELLAR`.
## Creation
-Bottles are created using the [Brew Test Bot](Brew-Test-Bot.md). This happens mostly when people submit pull requests to Homebrew and the `bottle do` block is updated by maintainers when they `brew pull --bottle` the contents of a pull request. For the Homebrew organisations' taps they are uploaded to and downloaded from [Bintray](https://bintray.com/homebrew).
+Bottles are created using the [Brew Test Bot](Brew-Test-Bot). This happens mostly when people submit pull requests to Homebrew and the `bottle do` block is updated by maintainers when they `brew pull --bottle` the contents of a pull request. For the Homebrew organisations' taps they are uploaded to and downloaded from [Bintray](https://bintray.com/homebrew).
By default, bottles will be built for the oldest CPU supported by the OS/architecture you're building for. (That's Core 2 for 64-bit OSs, Core for 32-bit.) This ensures that bottles are compatible with all computers you might distribute them to. If you *really* want your bottles to be optimized for something else, you can pass the `--bottle-arch=` option to build for another architecture - for example, `brew install foo --bottle-arch=penryn`. Just remember that if you build for a newer architecture some of your users might get binaries they can't run and that would be sad!
| true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/Brew-Test-Bot-For-Core-Contributors.md | @@ -5,7 +5,7 @@ If a build has run and passed on `brew test-bot` then it can be used to quickly
There are two types of Jenkins jobs you will interact with:
## [Homebrew Core Pull Requests](https://jenkins.brew.sh/job/Homebrew%20Core/)
-This job automatically builds any pull requests submitted to Homebrew/homebrew-core. On success or failure it updates the pull request status (see more details on the [main Brew Test Bot documentation page](Brew-Test-Bot.md)). On a successful build it automatically uploads bottles.
+This job automatically builds any pull requests submitted to Homebrew/homebrew-core. On success or failure it updates the pull request status (see more details on the [main Brew Test Bot documentation page](Brew-Test-Bot)). On a successful build it automatically uploads bottles.
## [Homebrew Testing](https://jenkins.brew.sh/job/Homebrew%20Testing/)
This job is manually triggered to run [`brew test-bot`](https://github.com/Homebrew/homebrew-test-bot/blob/master/cmd/brew-test-bot.rb) with user-specified parameters. On a successful build it automatically uploads bottles. | true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/Building-Against-Non-Homebrew-Dependencies.md | @@ -8,4 +8,4 @@ As Homebrew became primarily a binary package manager, most users were fulfillin
## Today
-If you wish to build against custom non-Homebrew dependencies that are provided by Homebrew (e.g. a non-Homebrew, non-macOS `ruby`) then you must [create and maintain your own tap](How-to-Create-and-Maintain-a-Tap.md) as these formulae will not be accepted in Homebrew/homebrew-core. Once you have done that you can specify `env :std` in the formula which will allow a e.g. `which ruby` to access your existing `PATH` variable and allow compilation to link against this Ruby.
+If you wish to build against custom non-Homebrew dependencies that are provided by Homebrew (e.g. a non-Homebrew, non-macOS `ruby`) then you must [create and maintain your own tap](How-to-Create-and-Maintain-a-Tap) as these formulae will not be accepted in Homebrew/homebrew-core. Once you have done that you can specify `env :std` in the formula which will allow a e.g. `which ruby` to access your existing `PATH` variable and allow compilation to link against this Ruby. | true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/Common-Issues.md | @@ -121,7 +121,7 @@ To list all files that would be deleted:
Don't follow the advice here but fix by using
`Language::Python.setup_install_args` in the formula as described in
-[Python for Formula Authors](Python-for-Formula-Authors.md).
+[Python for Formula Authors](Python-for-Formula-Authors).
### Upgrading macOS
| true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/External-Commands.md | @@ -44,7 +44,7 @@ Note they are largely untested, and as always, be careful about running untested
### brew-livecheck
Check if there is a new upstream version of a formula.
-See the [`README`](https://github.com/Homebrew/homebrew-livecheck/blob/master/README.md) for more info and usage.
+See the [`README`](https://github.com/Homebrew/homebrew-livecheck/blob/master/README) for more info and usage.
Install using:
| true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/FAQ.md | @@ -76,11 +76,11 @@ the launchctl PATH for _all users_. For earlier versions of macOS, see
[this page](https://developer.apple.com/legacy/library/qa/qa1067/_index.html).
## How do I contribute to Homebrew?
-Read [CONTRIBUTING.md](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md).
+Read [CONTRIBUTING.md](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING).
## Why do you compile everything?
Homebrew provides pre-compiled versions for many formulae. These
-pre-compiled versions are referred to as [bottles](Bottles.md) and are available
+pre-compiled versions are referred to as [bottles](Bottles) and are available
at <https://bintray.com/homebrew/bottles>.
If available, bottled binaries will be used by default except under the
@@ -163,7 +163,7 @@ creating a separate user account especially for use of Homebrew.
## Why isn’t a particular command documented?
-If it’s not in `man brew`, it’s probably an external command. These are documented [here](External-Commands.md).
+If it’s not in `man brew`, it’s probably an external command. These are documented [here](External-Commands).
## Why haven’t you pulled my pull request?
If it’s been a while, bump it with a “bump” comment. Sometimes we miss requests and there are plenty of them. Maybe we were thinking on something. It will encourage consideration. In the meantime if you could rebase the pull request so that it can be cherry-picked more easily we will love you for a long time.
@@ -179,7 +179,7 @@ install <formula>`. If you encounter any issues, run the command with the
into a debugging shell.
If you want your new formula to be part of `homebrew/core` or want
-to learn more about writing formulae, then please read the [Formula Cookbook](Formula-Cookbook.md).
+to learn more about writing formulae, then please read the [Formula Cookbook](Formula-Cookbook).
## Can I install my own stuff to `/usr/local`?
Yes, `brew` is designed to not get in your way so you can use it how you | true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/Formula-Cookbook.md | @@ -29,15 +29,15 @@ Make sure you run `brew update` before you start. This turns your Homebrew insta
Before submitting a new formula make sure your package:
-* meets all our [Acceptable Formulae](Acceptable-Formulae.md) requirements
+* meets all our [Acceptable Formulae](Acceptable-Formulae) requirements
* isn't already in Homebrew (check `brew search <formula>`)
* isn't in another official [Homebrew tap](https://github.com/Homebrew)
* isn't already waiting to be merged (check the [issue tracker](https://github.com/Homebrew/homebrew-core/pulls))
* is still supported by upstream (i.e. doesn't require extensive patching)
* has a stable, tagged version (i.e. not just a GitHub repository with no versions)
* passes all `brew audit --new-formula <formula>` tests.
-Before submitting a new formula make sure you read over our [contribution guidelines](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md).
+Before submitting a new formula make sure you read over our [contribution guidelines](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING).
### Grab the URL
@@ -251,7 +251,7 @@ Check the top of the e.g. `./configure` output. Some configure scripts do not re
### Add a test to the formula
-Add a valid test to the [`test do`](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#test-class_method) block of the formula. This will be run by `brew test foo` and the [Brew Test Bot](Brew-Test-Bot.md).
+Add a valid test to the [`test do`](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#test-class_method) block of the formula. This will be run by `brew test foo` and the [Brew Test Bot](Brew-Test-Bot).
The
[`test do`](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#test-class_method)
@@ -534,7 +534,7 @@ end
### Compiler selection
-Sometimes a package fails to build when using a certain compiler. Since recent [Xcode versions](Xcode.md) no longer include a GCC compiler we cannot simply force the use of GCC. Instead, the correct way to declare this is the [`fails_with` DSL method](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#fails_with-class_method). A properly constructed [`fails_with`](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#fails_with-class_method) block documents the latest compiler build version known to cause compilation to fail, and the cause of the failure. For example:
+Sometimes a package fails to build when using a certain compiler. Since recent [Xcode versions](Xcode) no longer include a GCC compiler we cannot simply force the use of GCC. Instead, the correct way to declare this is the [`fails_with` DSL method](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#fails_with-class_method). A properly constructed [`fails_with`](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#fails_with-class_method) block documents the latest compiler build version known to cause compilation to fail, and the cause of the failure. For example:
```ruby
fails_with :clang do | true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/Homebrew-and-Python.md | @@ -1,6 +1,6 @@
# Python
-This page describes how Python is handled in Homebrew for users. See [Python for Formula Authors](Python-for-Formula-Authors.md) for advice on writing formulae to install packages written in Python.
+This page describes how Python is handled in Homebrew for users. See [Python for Formula Authors](Python-for-Formula-Authors) for advice on writing formulae to install packages written in Python.
Homebrew should work with any [CPython](https://stackoverflow.com/questions/2324208/is-there-any-difference-between-cpython-and-python) and defaults to the macOS system Python.
@@ -66,7 +66,7 @@ Some formulae provide Python bindings. Sometimes a `--with-python` or `--with-py
Homebrew builds bindings against the first `python` (and `python-config`) in your `PATH`. (Check with `which python`).
-**Warning!** Python may crash (see [Common Issues](Common-Issues.md)) if you `import <module>` from a brewed Python if you ran `brew install <formula_with_python_bindings>` against the system Python. If you decide to switch to the brewed Python, then reinstall all formulae with Python bindings (e.g. `pyside`, `wxwidgets`, `pygtk`, `pygobject`, `opencv`, `vtk` and `boost-python`).
+**Warning!** Python may crash (see [Common Issues](Common-Issues)) if you `import <module>` from a brewed Python if you ran `brew install <formula_with_python_bindings>` against the system Python. If you decide to switch to the brewed Python, then reinstall all formulae with Python bindings (e.g. `pyside`, `wxwidgets`, `pygtk`, `pygobject`, `opencv`, `vtk` and `boost-python`).
## Policy for non-brewed Python bindings
These should be installed via `pip install <package>`. To discover, you can use `pip search` or <https://pypi.python.org/pypi>. (**Note:** System Python does not provide `pip`. Follow the [pip documentation](https://pip.readthedocs.io/en/stable/installing/#install-pip) to install it for your system Python if you would like it.) | true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/How-To-Open-a-Homebrew-Pull-Request.md | @@ -34,7 +34,7 @@ To make a new branch and submit it for review, create a GitHub pull request with
1. Check out the `master` branch with `git checkout master`.
2. Retrieve new changes to the `master` branch with `brew update`.
3. Create a new branch from the latest `master` branch with `git checkout -b <YOUR_BRANCH_NAME> origin/master`.
-4. Make your changes. For formulae, use `brew edit` or your favorite text editor, following all the guidelines in the [Formula Cookbook](Formula-Cookbook.md).
+4. Make your changes. For formulae, use `brew edit` or your favorite text editor, following all the guidelines in the [Formula Cookbook](Formula-Cookbook).
* If there's a `bottle do` block in the formula, don't remove or change it; we'll update it when we pull your PR.
5. Test your changes by doing the following, and ensure they all pass without issue. For changed formulae, make sure you do the `brew audit` step while your changed formula is installed.
* `brew tests` | true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/How-to-Create-and-Maintain-a-Tap.md | @@ -27,7 +27,7 @@ If it’s on GitHub, users can install any of your formulae with
file here.
If they want to get your tap without installing any formula at the same time,
-users can add it with the [`brew tap` command](Taps.md).
+users can add it with the [`brew tap` command](Taps).
If it’s on GitHub, they can use `brew tap user/repo`, where `user` is your
GitHub username and `homebrew-repo` your repository.
@@ -51,7 +51,7 @@ Once your tap is installed, Homebrew will update it each time a user runs
## External commands
You can provide your tap users with custom `brew` commands by adding them in a
-`cmd` subdirectory. [Read more on external commands](External-Commands.md).
+`cmd` subdirectory. [Read more on external commands](External-Commands).
See [homebrew/aliases](https://github.com/Homebrew/homebrew-aliases) for an
example of a tap with external commands. | true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/How-to-build-software-outside-Homebrew-with-Homebrew-keg-only-dependencies.md | @@ -2,7 +2,7 @@
## What does "keg-only" mean?
-The [FAQ](FAQ.md) briefly explains this.
+The [FAQ](FAQ) briefly explains this.
As an example:
| true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/Installation.md | @@ -4,7 +4,7 @@ The suggested and easiest way to install Homebrew is on the
[homepage](https://brew.sh).
The standard script installs Homebrew to `/usr/local` so that
-[you don’t need sudo](FAQ.md) when you
+[you don’t need sudo](FAQ) when you
`brew install`. It is a careful script; it can be run even if you have stuff
installed to `/usr/local` already. It tells you exactly what it will do before
it does it too. And you have to confirm everything it will do before it starts.
@@ -39,12 +39,12 @@ mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar
Create a Homebrew installation wherever you extract the tarball. Whichever `brew` command is called is where the packages will be installed. You can use this as you see fit, e.g. a system set of libs in `/usr/local` and tweaked formulae for development in `~/homebrew`.
## Uninstallation
-Uninstallation is documented in the [FAQ](FAQ.md).
+Uninstallation is documented in the [FAQ](FAQ).
<a name="1"><sup>1</sup></a> Not all formulae have CPU or OS requirements, but
you can assume you will have trouble if you don’t conform. Also, you can find
PowerPC and Tiger branches from other users in the fork network. See
-[Interesting Taps and Forks](Interesting-Taps-and-Forks.md).
+[Interesting Taps and Forks](Interesting-Taps-and-Forks).
<a name="2"><sup>2</sup></a> 10.10 or higher is recommended. 10.5–10.9 are
supported on a best-effort basis. For 10.4 see | true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/Maintainer-Guidelines.md | @@ -5,7 +5,7 @@ access** to Homebrew’s repository and help merge the contributions of
others. You may find what is written here interesting, but it’s
definitely not a beginner’s guide.
-Maybe you were looking for the [Formula Cookbook](Formula-Cookbook.md)?
+Maybe you were looking for the [Formula Cookbook](Formula-Cookbook)?
## Quick checklist
@@ -45,7 +45,7 @@ Add other names as aliases as symlinks in `Aliases` in the tap root. Ensure the
name referenced on the homepage is one of these, as it may be different and have
underscores and hyphens and so on.
-We now accept versioned formulae as long as they [meet the requirements](Versions.md).
+We now accept versioned formulae as long as they [meet the requirements](Versions).
### Merging, rebasing, cherry-picking
Merging should be done in the `Homebrew/brew` repository to preserve history & GPG commit signing,
@@ -64,7 +64,7 @@ the commits. Our main branch history should be useful to other people,
not confusing.
### Testing
-We need to at least check that it builds. Use the [Brew Test Bot](Brew-Test-Bot.md) for this.
+We need to at least check that it builds. Use the [Brew Test Bot](Brew-Test-Bot) for this.
Verify the formula works if possible. If you can’t tell (e.g. if it’s a
library) trust the original contributor, it worked for them, so chances are it | true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/New-Maintainer-Checklist.md | @@ -59,6 +59,6 @@ If they accept, follow a few steps to get them set up:
- Invite them to the [`homebrew` private maintainers 1Password](https://homebrew.1password.com/signin)
- Invite them to [Google Analytics](https://analytics.google.com/analytics/web/?authuser=1#management/Settings/a76679469w115400090p120682403/%3Fm.page%3DAccountUsers/)
-After a month-long trial period with no problems make them [owners on the Homebrew GitHub organisation](https://github.com/orgs/Homebrew/people) and add them to [Homebrew's README](https://github.com/Homebrew/brew/edit/master/README.md). If there are problems, ask them to step down as a maintainer and revoke their access to the above.
+After a month-long trial period with no problems make them [owners on the Homebrew GitHub organisation](https://github.com/orgs/Homebrew/people) and add them to [Homebrew's README](https://github.com/Homebrew/brew/edit/master/README). If there are problems, ask them to step down as a maintainer and revoke their access to the above.
Now sit back, relax and let the new maintainers handle more of our contributions. | true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/Node-for-Formula-Authors.md | @@ -82,7 +82,7 @@ In your formula's `install` method, do any installation steps which need to be d
system "npm", "install", *Language::Node.local_npm_install_args
```
-This will install all of your Node modules dependencies to your local build path. You can now continue with your build steps and take care of the installation into the Homebrew `prefix` on your own, following the [general Homebrew formula instructions](Formula-Cookbook.md).
+This will install all of your Node modules dependencies to your local build path. You can now continue with your build steps and take care of the installation into the Homebrew `prefix` on your own, following the [general Homebrew formula instructions](Formula-Cookbook).
## Example
| true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/README.md | @@ -1,46 +1,46 @@
# Documentation
## Users
-- [`brew` man-page (command documentation)](Manpage.md)
-- [Troubleshooting](Troubleshooting.md)
-- [Installation](Installation.md)
-- [Frequently Asked Questions](FAQ.md)
-- [Common Issues](Common-Issues.md)
+- [`brew` man-page (command documentation)](Manpage)
+- [Troubleshooting](Troubleshooting)
+- [Installation](Installation)
+- [Frequently Asked Questions](FAQ)
+- [Common Issues](Common-Issues)
-- [Tips and Tricks](Tips-N'-Tricks.md)
-- [Bottles (binary packages)](Bottles.md)
-- [Taps (third-party repositories)](Taps.md)
-- [Interesting Taps and Forks](Interesting-Taps-and-Forks.md)
-- [Anonymous Aggregate User Behaviour Analytics](Analytics.md)
+- [Tips and Tricks](Tips-N'-Tricks)
+- [Bottles (binary packages)](Bottles)
+- [Taps (third-party repositories)](Taps)
+- [Interesting Taps and Forks](Interesting-Taps-and-Forks)
+- [Anonymous Aggregate User Behaviour Analytics](Analytics)
-- [Querying `brew`](Querying-Brew.md)
-- [C++ Standard Libraries](C++-Standard-Libraries.md)
-- [MD5 and SHA-1 Deprecation](Checksum_Deprecation.md)
-- [Custom GCC and Cross Compilers](Custom-GCC-and-cross-compilers.md)
-- [External Commands](External-Commands.md)
-- [Ruby Gems, Python Eggs and Perl Modules](Gems,-Eggs-and-Perl-Modules.md)
-- [Python](Homebrew-and-Python.md)
-- [How To Build Software Outside Homebrew With Homebrew `keg_only` dependencies](How-to-build-software-outside-Homebrew-with-Homebrew-keg-only-dependencies.md)
-- [Xcode](Xcode.md)
-- [Kickstarter Supporters](Kickstarter-Supporters.md)
+- [Querying `brew`](Querying-Brew)
+- [C++ Standard Libraries](C++-Standard-Libraries)
+- [MD5 and SHA-1 Deprecation](Checksum_Deprecation)
+- [Custom GCC and Cross Compilers](Custom-GCC-and-cross-compilers)
+- [External Commands](External-Commands)
+- [Ruby Gems, Python Eggs and Perl Modules](Gems,-Eggs-and-Perl-Modules)
+- [Python](Homebrew-and-Python)
+- [How To Build Software Outside Homebrew With Homebrew `keg_only` dependencies](How-to-build-software-outside-Homebrew-with-Homebrew-keg-only-dependencies)
+- [Xcode](Xcode)
+- [Kickstarter Supporters](Kickstarter-Supporters)
## Contributors
-- [How To Open A Pull Request (and get it merged)](How-To-Open-a-Homebrew-Pull-Request.md)
-- [Formula Cookbook](Formula-Cookbook.md)
-- [Acceptable Formulae](Acceptable-Formulae.md)
-- [Formulae Versions](Versions.md)
-- [Node for Formula Authors](Node-for-Formula-Authors.md)
-- [Python for Formula Authors](Python-for-Formula-Authors.md)
-- [Migrating A Formula To A Tap](Migrating-A-Formula-To-A-Tap.md)
-- [Rename A Formula](Rename-A-Formula.md)
-- [Building Against Non-Homebrew Dependencies](Building-Against-Non-Homebrew-Dependencies.md)
-- [How To Create (And Maintain) A Tap](How-to-Create-and-Maintain-a-Tap.md)
-- [Brew Test Bot](Brew-Test-Bot.md)
-- [Prose Style Guidelines](Prose-Style-Guidelines.md)
+- [How To Open A Pull Request (and get it merged)](How-To-Open-a-Homebrew-Pull-Request)
+- [Formula Cookbook](Formula-Cookbook)
+- [Acceptable Formulae](Acceptable-Formulae)
+- [Formulae Versions](Versions)
+- [Node for Formula Authors](Node-for-Formula-Authors)
+- [Python for Formula Authors](Python-for-Formula-Authors)
+- [Migrating A Formula To A Tap](Migrating-A-Formula-To-A-Tap)
+- [Rename A Formula](Rename-A-Formula)
+- [Building Against Non-Homebrew Dependencies](Building-Against-Non-Homebrew-Dependencies)
+- [How To Create (And Maintain) A Tap](How-to-Create-and-Maintain-a-Tap)
+- [Brew Test Bot](Brew-Test-Bot)
+- [Prose Style Guidelines](Prose-Style-Guidelines)
## Maintainers
-- [New Maintainer Checklist](New-Maintainer-Checklist.md)
-- [Maintainers: Avoiding Burnout](Maintainers-Avoiding-Burnout.md)
-- [Maintainer Guidelines](Maintainer-Guidelines.md)
-- [Brew Test Bot For Maintainers](Brew-Test-Bot-For-Core-Contributors.md)
-- [Common Issues for Maintainers](Common-Issues-for-Core-Contributors.md)
+- [New Maintainer Checklist](New-Maintainer-Checklist)
+- [Maintainers: Avoiding Burnout](Maintainers-Avoiding-Burnout)
+- [Maintainer Guidelines](Maintainer-Guidelines)
+- [Brew Test Bot For Maintainers](Brew-Test-Bot-For-Core-Contributors)
+- [Common Issues for Maintainers](Common-Issues-for-Core-Contributors) | true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/Tips-N'-Tricks.md | @@ -3,7 +3,7 @@
## Installing previous versions of formulae
The supported method of installing specific versions of
-some formulae is to see if there is a versioned formula (e.g. `gcc@6`) available. If the version you’re looking for isn’t available, consider [opening a pull request](How-To-Open-a-Homebrew-Pull-Request.md)!
+some formulae is to see if there is a versioned formula (e.g. `gcc@6`) available. If the version you’re looking for isn’t available, consider [opening a pull request](How-To-Open-a-Homebrew-Pull-Request)!
### Installing directly from pull requests
You can [browse pull requests](https://github.com/Homebrew/homebrew-core/pulls) | true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/Troubleshooting.md | @@ -12,7 +12,7 @@ Follow these steps to fix common problems:
* Run `brew doctor` and fix all the warnings (**outdated Xcode/CLT and unbrewed dylibs are very likely to cause problems**).
* Check that **Command Line Tools for Xcode (CLT)** and **Xcode** are up to date.
* If commands fail with permissions errors, check the permissions of `/usr/local`'s subdirectories. If you’re unsure what to do, you can run `cd /usr/local && sudo chown -R $(whoami) bin etc include lib sbin share var Frameworks`.
-* Read through the [Common Issues](Common-Issues.md).
+* Read through the [Common Issues](Common-Issues).
## Check to see if the issue has been reported
| true |
Other | Homebrew | brew | e63a2ee8de12f0f938f6a95cdb9763dbe0187b4a.json | docs: use short links. | docs/Versions.md | @@ -18,6 +18,6 @@ Versioned formulae we include in [homebrew/core](https://github.com/homebrew/hom
* Versioned formulae should be as similar as possible and sensible to the unversioned formulae. Creating or updating a versioned formula should be a chance to ask questions of the unversioned formula e.g. can some unused or useless options be removed or made default?
* No more than five versions of a formula (including the non-versioned one) will be supported at any given time, regardless of usage. When removing formulae that violate this we will aim to do so based on usage and support status rather than age.
-Homebrew's versions are not intended to be used for any old versions you personally require for your project. You should create your own [tap](How-to-Create-and-Maintain-a-Tap.md) for formulae you or your organisation wish to control the versioning of or those that do not meet the above standards. Software that has regular API or ABI breaking releases still needs to meet all the above requirements; that a `brew upgrade` has broken something for you is not an argument for us to add and maintain a formula for you.
+Homebrew's versions are not intended to be used for any old versions you personally require for your project. You should create your own [tap](How-to-Create-and-Maintain-a-Tap) for formulae you or your organisation wish to control the versioning of or those that do not meet the above standards. Software that has regular API or ABI breaking releases still needs to meet all the above requirements; that a `brew upgrade` has broken something for you is not an argument for us to add and maintain a formula for you.
We may temporarily add versioned formulae for our own needs that do not meet these standards in [homebrew/core](https://github.com/homebrew/homebrew-core). The presence of a versioned formula there does not imply it will be maintained indefinitely or that we are willing to accept any more versions that do not meet the requirements above. | true |
Other | Homebrew | brew | c83dd0d04b857161b47a43b54ba56c7296ac50c0.json | brew style: replace tabs with spaces | Library/Homebrew/test/os/linux/dependency_collector_spec.rb | @@ -12,41 +12,41 @@
context "when xz, zip, and bzip2 are not available" do
it "creates a resource dependency from a '.xz' URL" do
- resource.url("http://example.com/foo.xz")
- allow_any_instance_of(Object).to receive(:which).with("xz")
- expect(subject.add(resource)).to eq(Dependency.new("xz", [:build]))
+ resource.url("http://example.com/foo.xz")
+ allow_any_instance_of(Object).to receive(:which).with("xz")
+ expect(subject.add(resource)).to eq(Dependency.new("xz", [:build]))
end
it "creates a resource dependency from a '.zip' URL" do
- resource.url("http://example.com/foo.zip")
- allow_any_instance_of(Object).to receive(:which).with("zip")
- expect(subject.add(resource)).to eq(Dependency.new("zip", [:build]))
+ resource.url("http://example.com/foo.zip")
+ allow_any_instance_of(Object).to receive(:which).with("zip")
+ expect(subject.add(resource)).to eq(Dependency.new("zip", [:build]))
end
it "creates a resource dependency from a '.bz2' URL" do
- resource.url("http://example.com/foo.tar.bz2")
- allow_any_instance_of(Object).to receive(:which).with("bzip2")
- expect(subject.add(resource)).to eq(Dependency.new("bzip2", [:build]))
+ resource.url("http://example.com/foo.tar.bz2")
+ allow_any_instance_of(Object).to receive(:which).with("bzip2")
+ expect(subject.add(resource)).to eq(Dependency.new("bzip2", [:build]))
end
end
context "when xz, zip, and bzip2 are available" do
it "does not create a resource dependency from a '.xz' URL" do
- resource.url("http://example.com/foo.xz")
- allow_any_instance_of(Object).to receive(:which).with("xz").and_return(Pathname.new("foo"))
- expect(subject.add(resource)).to be nil
+ resource.url("http://example.com/foo.xz")
+ allow_any_instance_of(Object).to receive(:which).with("xz").and_return(Pathname.new("foo"))
+ expect(subject.add(resource)).to be nil
end
it "does not create a resource dependency from a '.zip' URL" do
- resource.url("http://example.com/foo.zip")
- allow_any_instance_of(Object).to receive(:which).with("zip").and_return(Pathname.new("foo"))
- expect(subject.add(resource)).to be nil
+ resource.url("http://example.com/foo.zip")
+ allow_any_instance_of(Object).to receive(:which).with("zip").and_return(Pathname.new("foo"))
+ expect(subject.add(resource)).to be nil
end
it "does not create a resource dependency from a '.bz2' URL" do
- resource.url("http://example.com/foo.tar.bz2")
- allow_any_instance_of(Object).to receive(:which).with("bzip2").and_return(Pathname.new("foo"))
- expect(subject.add(resource)).to be nil
+ resource.url("http://example.com/foo.tar.bz2")
+ allow_any_instance_of(Object).to receive(:which).with("bzip2").and_return(Pathname.new("foo"))
+ expect(subject.add(resource)).to be nil
end
end
end | false |
Other | Homebrew | brew | a9c64c319f8b8ef4aa3c0265bbe735002daa0d60.json | gist-logs: require API credentials.
Anonymous gists are going away shortly:
https://github.com/blog/2503-deprecation-notice-removing-anonymous-gist-creation | Library/Homebrew/cmd/gist-logs.rb | @@ -39,6 +39,16 @@ def gistify_logs(f)
files["00.tap.out"] = { content: tap }
end
+ if GitHub.api_credentials_type == :none
+ puts <<~EOS
+ You can create a new personal access token:
+ #{GitHub::ALL_SCOPES_URL}
+ and then set the new HOMEBREW_GITHUB_API_TOKEN as the authentication method.
+
+ EOS
+ login!
+ end
+
# Description formatted to work well as page title when viewing gist
if f.core_formula?
descr = "#{f.name} on #{OS_VERSION} - Homebrew build logs"
@@ -48,16 +58,6 @@ def gistify_logs(f)
url = create_gist(files, descr)
if ARGV.include?("--new-issue") || ARGV.switch?("n")
- if GitHub.api_credentials_type == :none
- puts <<~EOS
- You can create a new personal access token:
- #{GitHub::ALL_SCOPES_URL}
- and then set the new HOMEBREW_GITHUB_API_TOKEN as the authentication method.
-
- EOS
- login!
- end
-
url = create_issue(f.tap, "#{f.name} failed to build on #{MacOS.full_version}", url)
end
| false |
Other | Homebrew | brew | c57ab279ba4c723c275864e4f99c55a1cbc62a67.json | Use rspec-retry in flaky brew tests.
We have a few tests that are intermittently flaky. Let's try this to see
if we can get them a bit more reliable. | Library/Homebrew/test/Gemfile | @@ -5,6 +5,7 @@ require_relative "../constants"
gem "parallel_tests"
gem "rspec"
gem "rspec-its", require: false
+gem "rspec-retry", require: false
gem "rspec-wait", require: false
gem "rubocop", HOMEBREW_RUBOCOP_VERSION
| true |
Other | Homebrew | brew | c57ab279ba4c723c275864e4f99c55a1cbc62a67.json | Use rspec-retry in flaky brew tests.
We have a few tests that are intermittently flaky. Let's try this to see
if we can get them a bit more reliable. | Library/Homebrew/test/Gemfile.lock | @@ -31,6 +31,8 @@ GEM
rspec-mocks (3.6.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
+ rspec-retry (0.5.6)
+ rspec-core (> 3.3, < 3.8)
rspec-support (3.6.0)
rspec-wait (0.0.9)
rspec (>= 3, < 4)
@@ -58,9 +60,10 @@ DEPENDENCIES
parallel_tests
rspec
rspec-its
+ rspec-retry
rspec-wait
rubocop (= 0.52.1)
simplecov
BUNDLED WITH
- 1.16.0
+ 1.16.1 | true |
Other | Homebrew | brew | c57ab279ba4c723c275864e4f99c55a1cbc62a67.json | Use rspec-retry in flaky brew tests.
We have a few tests that are intermittently flaky. Let's try this to see
if we can get them a bit more reliable. | Library/Homebrew/test/cmd/search_spec.rb | @@ -25,7 +25,7 @@
.and be_a_success
end
- it "falls back to a GitHub tap search when no formula is found", :needs_network do
+ it "falls back to a GitHub tap search when no formula is found", :needs_network, retry: 3 do
expect { brew "search", "caskroom/cask/firefox" }
.to output(/firefox/).to_stdout
.and output(/Searching/).to_stderr | true |
Other | Homebrew | brew | c57ab279ba4c723c275864e4f99c55a1cbc62a67.json | Use rspec-retry in flaky brew tests.
We have a few tests that are intermittently flaky. Let's try this to see
if we can get them a bit more reliable. | Library/Homebrew/test/cmd/services_spec.rb | @@ -1,4 +1,4 @@
-describe "brew services", :integration_test, :needs_macos, :needs_network do
+describe "brew services", :integration_test, :needs_macos, :needs_network, retry: 3 do
it "allows controlling services" do
setup_remote_tap "homebrew/services"
| true |
Other | Homebrew | brew | c57ab279ba4c723c275864e4f99c55a1cbc62a67.json | Use rspec-retry in flaky brew tests.
We have a few tests that are intermittently flaky. Let's try this to see
if we can get them a bit more reliable. | Library/Homebrew/test/dev-cmd/pull_spec.rb | @@ -6,7 +6,7 @@
.and be_a_failure
end
- it "fetches a patch from a GitHub commit or pull request and applies it", :needs_network do
+ it "fetches a patch from a GitHub commit or pull request and applies it", :needs_network, retry: 3 do
CoreTap.instance.path.cd do
system "git", "init"
system "git", "checkout", "-b", "new-branch" | true |
Other | Homebrew | brew | c57ab279ba4c723c275864e4f99c55a1cbc62a67.json | Use rspec-retry in flaky brew tests.
We have a few tests that are intermittently flaky. Let's try this to see
if we can get them a bit more reliable. | Library/Homebrew/test/spec_helper.rb | @@ -2,6 +2,7 @@
require "pathname"
require "rspec/its"
require "rspec/wait"
+require "rspec/retry"
require "rubocop"
require "rubocop/rspec/support"
require "set" | true |
Other | Homebrew | brew | 40ca03e975041b4fce9a3097fed5739653c039f3.json | Add undeclared dependencies to Tab when installing
An installed formula doesn't get optlinked until _after_ it's installed,
meaning that we can't rely on `opt_prefix` to get the right keg.
So, if not optlinked, fall back to the formula's prefix, which will be
that of the current installation. | Library/Homebrew/formula.rb | @@ -13,6 +13,7 @@
require "tap"
require "keg"
require "migrator"
+require "os/mac/linkage_checker"
require "extend/ENV"
require "language/python"
@@ -1840,9 +1841,14 @@ def declared_runtime_dependencies
end
def undeclared_runtime_dependencies
- return [] unless optlinked?
+ if optlinked?
+ keg = Keg.new(opt_prefix)
+ elsif prefix.directory?
+ keg = Keg.new(prefix)
+ else
+ return []
+ end
- keg = Keg.new(opt_prefix)
linkage_checker = LinkageChecker.new(keg, self)
dylib_formula_names = linkage_checker.brewed_dylibs.keys
linked_formulae_names = dylib_formula_names - [name] | false |
Other | Homebrew | brew | c946da88ab07772ac4becd45ef0c82a60bbfc515.json | linkage_checker: Distinguish indirect deps from undeclared deps | Library/Homebrew/os/mac/linkage_checker.rb | @@ -14,6 +14,7 @@ def initialize(keg, formula = nil)
@system_dylibs = Set.new
@broken_dylibs = Set.new
@variable_dylibs = Set.new
+ @indirect_deps = []
@undeclared_deps = []
@reverse_links = Hash.new { |h, k| h[k] = Set.new }
@unnecessary_deps = []
@@ -52,7 +53,7 @@ def check_dylibs
end
end
- @undeclared_deps, @unnecessary_deps = check_undeclared_deps if formula
+ @indirect_deps, @undeclared_deps, @unnecessary_deps = check_undeclared_deps if formula
end
def check_undeclared_deps
@@ -62,13 +63,31 @@ def check_undeclared_deps
formula.build.without?(dep)
end
declared_deps = formula.deps.reject { |dep| filter_out.call(dep) }.map(&:name)
+ recursive_deps = keg.to_formula.runtime_dependencies.map { |dep| dep.to_formula.full_name }
declared_dep_names = declared_deps.map { |dep| dep.split("/").last }
- undeclared_deps = @brewed_dylibs.keys.reject do |full_name|
+ indirect_deps = []
+ undeclared_deps = []
+ @brewed_dylibs.each_key do |full_name|
name = full_name.split("/").last
- next true if name == formula.name
- declared_dep_names.include?(name)
+ next if name == formula.name
+ if recursive_deps.include?(name)
+ indirect_deps << full_name unless declared_dep_names.include?(name)
+ else
+ undeclared_deps << full_name
+ end
+ end
+ sort_by_formula_full_name!(indirect_deps)
+ sort_by_formula_full_name!(undeclared_deps)
+ unnecessary_deps = declared_dep_names.reject do |full_name|
+ name = full_name.split("/").last
+ next true if Formula[name].bin.directory?
+ @brewed_dylibs.keys.map { |x| x.split("/").last }.include?(name)
end
- undeclared_deps.sort do |a, b|
+ [indirect_deps, undeclared_deps, unnecessary_deps]
+ end
+
+ def sort_by_formula_full_name!(arr)
+ arr.sort! do |a, b|
if a.include?("/") && !b.include?("/")
1
elsif !a.include?("/") && b.include?("/")
@@ -77,17 +96,12 @@ def check_undeclared_deps
a <=> b
end
end
- unnecessary_deps = declared_dep_names.reject do |full_name|
- name = full_name.split("/").last
- next true if Formula[name].bin.directory?
- @brewed_dylibs.keys.map { |x| x.split("/").last }.include?(name)
- end
- [undeclared_deps, unnecessary_deps]
end
def display_normal_output
display_items "System libraries", @system_dylibs
display_items "Homebrew libraries", @brewed_dylibs
+ display_items "Indirect dependencies with linkage", @indirect_deps
display_items "Variable-referenced libraries", @variable_dylibs
display_items "Missing libraries", @broken_dylibs
display_items "Undeclared dependencies with linkage", @undeclared_deps | false |
Other | Homebrew | brew | c32865011d1536eb6f7e626a3cb389d35beda48a.json | xcode_requirement: handle nil @version.
When the Xcode requirement doesn't specify a version then we need to
guard this check. | Library/Homebrew/requirements/xcode_requirement.rb | @@ -22,7 +22,7 @@ def message
A full installation of Xcode.app#{version} is required to compile this software.
Installing just the Command Line Tools is not sufficient.
EOS
- if Version.new(MacOS::Xcode.latest_version) < Version.new(@version)
+ if @version && Version.new(MacOS::Xcode.latest_version) < Version.new(@version)
message + <<~EOS
Xcode#{version} cannot be installed on macOS #{MacOS.version}.
You must upgrade your version of macOS. | false |
Other | Homebrew | brew | 7fffccba05f8f31d86ae81ee14b81f8ff0c633b5.json | audit: Remove FILEUTILS_METHODS constant
This constant hasn't been used since there was an `audit_line`
method, and as such is vestigial. | Library/Homebrew/dev-cmd/audit.rb | @@ -189,8 +189,6 @@ class FormulaAuditor
swig
].freeze
- FILEUTILS_METHODS = FileUtils.singleton_methods(false).map { |m| Regexp.escape(m) }.join "|"
-
def initialize(formula, options = {})
@formula = formula
@new_formula = options[:new_formula] | false |
Other | Homebrew | brew | 601af55b43bc96627359eca06eeec4bf9881c890.json | Add root dirname as a escape value too | Library/Homebrew/download_strategy.rb | @@ -306,7 +306,7 @@ def ext
url_pathname = Pathname.new(@url)
until ext = url_pathname.extname[/[^?]+/]
url_pathname = url_pathname.dirname
- return if url_pathname.to_s == "."
+ return if url_pathname.to_s == "." || url_pathname.to_s == "/"
end
ext
end | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.