Merge pull request #14738 from aristocrates/patch-1

Improve unversioned python location specification
This commit is contained in:
Mike McQuaid 2023-02-21 19:32:01 +00:00 committed by GitHub
commit 059945ae0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -60,7 +60,7 @@ which therefore dont need sudo.
_This is only recommended if you **don't** use rbenv or RVM._
Brewed Ruby installs executables to `$(brew --prefix)/opt/ruby/bin`
Brewed Ruby installs executables to `$(brew --prefix ruby)/bin`
without sudo. You should add this to your path. See the caveats in the
`ruby` formula for up-to-date information.
@ -91,7 +91,7 @@ Just install everything into the Homebrew prefix like this:
echo "export GEM_HOME=\"$(brew --prefix)\"" >> ~/.bashrc
```
### It doesnt work! I get some “permissions” error when I try to install stuff!
### It doesnt work! I get some “permissions” error when I try to install stuff
_Note that you may not want to do this, since Apple has decided it
is not a good default._

View File

@ -23,7 +23,7 @@ The executables are organised as follows:
Unversioned symlinks for `python`, `python-config`, `pip` etc. are installed here:
```sh
$(brew --prefix)/opt/python/libexec/bin
$(brew --prefix python)/libexec/bin
```
## Setuptools, pip, etc.

View File

@ -27,13 +27,13 @@ Useful, reliable alternatives exist should you wish to use keg-only tools outsid
You can set flags to give configure scripts or Makefiles a nudge in the right direction. An example of flag setting:
```sh
./configure --prefix=/Users/Dave/Downloads CFLAGS="-I$(brew --prefix)/opt/openssl/include" LDFLAGS="-L$(brew --prefix)/opt/openssl/lib"
./configure --prefix=/Users/Dave/Downloads CFLAGS="-I$(brew --prefix openssl)/include" LDFLAGS="-L$(brew --prefix openssl)/lib"
```
An example using `pip`:
```sh
CFLAGS="-I$(brew --prefix)/opt/icu4c/include" LDFLAGS="-L$(brew --prefix)/opt/icu4c/lib" pip install pyicu
CFLAGS="-I$(brew --prefix icu4c)/include" LDFLAGS="-L$(brew --prefix icu4c)/lib" pip install pyicu
```
### `PATH` modification
@ -41,7 +41,7 @@ CFLAGS="-I$(brew --prefix)/opt/icu4c/include" LDFLAGS="-L$(brew --prefix)/opt/ic
You can temporarily prepend your `PATH` with the tools `bin` directory, such as:
```sh
export PATH="$(brew --prefix)/opt/openssl/bin:${PATH}"
export PATH="$(brew --prefix openssl)/bin:${PATH}"
```
This will prepend the directory to your `PATH`, ensuring any build script that searches the `PATH` will find it first.
@ -55,7 +55,7 @@ If the tool you are attempting to build is [pkg-config](https://en.wikipedia.org
An example of this is:
```sh
export PKG_CONFIG_PATH="$(brew --prefix)/opt/openssl/lib/pkgconfig"
export PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig"
```
If youre curious about the `PKG_CONFIG_PATH` variable, `man pkg-config` goes into more detail.