Skip to content

Commit 5e1079c

Browse files
committed
☕️ brew changes
1 parent af31f7b commit 5e1079c

File tree

8 files changed

+15
-95
lines changed

8 files changed

+15
-95
lines changed

Makefile

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,6 @@ brew-cleanup-force: ## Cleanup Homebrew, remove unused packages.
3838
brew bundle cleanup --force --file "$(MAKE_DIR)/macos/Brewfile"
3939
@echo "Homebrew cleaned up successfully 🎉"
4040

41-
.PHONY: xbrew-bundle
42-
xbrew-bundle: ## Install x86 packages from the XBrewfile.
43-
@echo "Installing x86 packages from XBrewfile 📦"
44-
xbrew bundle --file "$(MAKE_DIR)/macos/XBrewfile"
45-
@echo "x86 packages installed successfully 🎉"
46-
47-
.PHONY: xbrew-cleanup
48-
xbrew-cleanup: ## Cleanup x86 Homebrew, remove unused packages (dry-run).
49-
@echo "x86 Homebrew cleanup summary 🧹"
50-
xbrew bundle cleanup --file "$(MAKE_DIR)/macos/XBrewfile"
51-
@echo "x86 Homebrew cleanup summary complete 🎉"
52-
53-
.PHONY: xbrew-cleanup-force
54-
xbrew-cleanup-force: ## Cleanup x86 Homebrew, remove unused packages.
55-
@echo "Cleaning up x86 Homebrew 🧹"
56-
xbrew bundle cleanup --force --file "$(MAKE_DIR)/macos/XBrewfile"
57-
@echo "x86 Homebrew cleaned up successfully 🎉"
58-
5941
##@ python 🐍
6042

6143
.PHONY: python-install-all

docs/dev-setup/python.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ uv tool install <package-name>
5555

5656
[Python]: https://python.org/
5757
[uv tool]: https://docs.astral.sh/uv/guides/tools/
58-
[uv]: https://docs.astral.sh/uv/
58+
[uv]: https://github.com/astral-sh/uv
5959
[IPython]: http://ipython.org/
6060
[ipython.png]: https://i.imgur.com/pu16vey.png
61+
[uv]: https://github.com/astral-sh/uv

docs/dev-setup/silicon.md

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ from Intel processors to Apple silicon in Mac computers.
55

66
Software is created with specific hardware in mind. In the past, software was made
77
for Macs with Intel processors, which use the `x86` instruction set. Now,
8-
software needs to be created for both Intel and Apple silicon (which uses the `ARM` instruction set)
8+
software needs to be created for both Intel and Apple Silicon (which uses the `ARM` instruction set)
99
in order for the software to work efficiently and properly for each platform.
1010

1111
## Rosetta
@@ -20,7 +20,7 @@ ARM-based processors.
2020
softwareupdate --install-rosetta --agree-to-license
2121
```
2222

23-
In addition to configuring Homebrew for M1, add a second Homebrew installation for
23+
In addition to configuring Homebrew for Silicon, add a second Homebrew installation for
2424
the `x86_64` architecture.
2525

2626
```shell
@@ -31,7 +31,7 @@ By default, simply use the brew command when installing any brew packages,
3131
but add an alias to your startup files for the `x86` version of
3232
Homebrew, such as the following. This will allow you to easily install dependencies
3333
that are only supported on the `x86_64` architecture. You can add the following
34-
line to your `~/.zshrc` or similar file:
34+
line to your `~/.zshrc` or similar file to give x86 HomeBrew the alias of `xbrew`:
3535

3636
```shell
3737
alias xbrew="arch -x86_64 /usr/local/bin/brew"
@@ -46,48 +46,26 @@ modules with components written in other programming languages: like `numpy`, `p
4646

4747
When maintainers upload a compiled package to PyPI they also will typically upload
4848
compiled wheel (binary) files which come with variants for your exact system:
49-
`MacOS x ARM x Python 3.11`. However for older versions of the packages and python versions it is
49+
`MacOS x ARM x Python 3.11`. However, for older versions of the packages and python versions it is
5050
common for these wheels to be missing for our `MacOS x ARM` machines.
5151

52-
To fix this issue of wheel compatibility of our systems we will use [Rosetta] to
52+
To fix this issue of wheel compatibility of our systems we will use [Rosetta] and [uv] to
5353
install and use an `x86` version of Python instead. This way we can use `x86` versions
5454
of the wheels for packages which can be much more widely available.
5555

56-
> [!IMPORTANT] dotfiles
57-
> If you're using the dotfiles from this project, this process can be streamlined
58-
> as long as you have the `x86` version of Homebrew installed (described above).
59-
> The `xbrew` and `xpython` aliases are already included in the dotfiles - and there
60-
> is an `XBrewfile` in the `macos` directory that can be used to install all the current
61-
> Python versions:
62-
>
63-
> ```shell
64-
> xbrew bundle --file ~/.dotfiles/macos/XBrewfile
65-
> xpython3.8 -m venv .venv
66-
> source .venv/bin/activate
67-
> ```
68-
69-
1. Install your base `x86` Version of Python
70-
71-
- The example above is for `Python 3.8` but it’s good to have one
72-
installed for all major versions.
73-
74-
```shell
75-
xbrew install "[email protected]"
76-
```
77-
78-
2. Create a Virtual Environment in your repository’s `.venv` directory using that `x86` Python
56+
1. Create a Virtual Environment in your repository’s `.venv` directory using an `x86` Python
7957

8058
```shell
81-
"$(xbrew --prefix [email protected])/bin/python3.8" -m venv .venv
59+
UV_PYTHON=3.11-x86_64 uv venv
8260
```
8361

84-
3. Activate the `x86` Python Virtual Environment you just created.
62+
2. Activate the `x86` Python Virtual Environment you just created.
8563

8664
```shell
8765
source .venv/bin/activate
8866
```
8967

90-
4. Install any tools or requirements you might need
68+
3. Install any tools or requirements you might need
9169

9270
- Using `x86` python versions to run tools like `tox`, which
9371
creates its own virtual environments, can be especially important

docs/dotfiles/dependencies.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,6 @@ packages.
100100
dotfiles brew-cleanup-force
101101
```
102102

103-
#### x86 macOS
104-
105-
This project uses x86 emulation via [Rosetta 2](https://support.apple.com/en-us/HT211861)
106-
on Apple Silicon Macs. Any x86 specific dependencies will be installed via the `XBrewfile`:
107-
108-
=== "xbrew"
109-
110-
```shell
111-
xbrew bundle --file ~/.dotfiles/macos/XBrewfile
112-
```
113-
114-
=== "dotfiles"
115-
116-
```shell
117-
dotfiles xbrew-bundle
118-
```
119-
120103
### Python
121104

122105
This project uses [uv tool](https://docs.astral.sh/uv/concepts/tools/) to install Python CLI

macos/Brewfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@ brew "kind"
3434
brew "kustomize"
3535
brew "libomp"
3636
brew "make"
37+
brew "mise"
3738
brew "multi-gitter"
3839
brew "nano"
3940
brew "neovim"
4041
brew "node"
4142
brew "nvm"
4243
brew "openjdk"
44+
brew "opentofu"
4345
brew "ripgrep"
4446
brew "rich-cli"
4547
brew "sops"
@@ -57,7 +59,7 @@ brew "zoxide"
5759
######################### CASKS ##########################
5860
##########################################################
5961

60-
cask "1password", greedy: true
62+
cask "1password", greedy: true, args: { appdir: "/Applications" }
6163
cask "1password-cli", greedy: true
6264
cask "amazon-q", greedy: true
6365
cask "caffeine", greedy: true

macos/XBrewfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

shell/.shell_aliases

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,6 @@ alias status="git status --verbose --ahead-behind --branch --find-renames"
1414
##################### MAC ALIASES ########################
1515
##########################################################
1616

17-
if [[ ${OSTYPE} == "darwin"* ]]; then
18-
######################################################
19-
################### X86 ALIASES ######################
20-
######################################################
21-
alias xpython3.12="\$(xbrew --prefix [email protected])/bin/python3.12"
22-
alias xpython3.11="\$(xbrew --prefix [email protected])/bin/python3.11"
23-
alias xpython3.10="\$(xbrew --prefix [email protected])/bin/python3.10"
24-
alias xpython3.9="\$(xbrew --prefix [email protected])/bin/python3.9"
25-
alias xpython3.8="\$(xbrew --prefix [email protected])/bin/python3.8"
26-
######################################################
27-
fi
28-
2917
##########################################################
3018
##################### APPLICATIONS #######################
3119
##########################################################

shell/.shell_startup

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ if [[ $(uname) == "Darwin" ]]; then
2020
elif [[ $(uname -m) == "x86_64" && -f /usr/local/bin/brew ]]; then
2121
eval "$(/usr/local/bin/brew shellenv)"
2222
fi
23+
export HOMEBREW_CASK_OPTS="--appdir=${HOME}/Applications"
2324
fi
2425

2526
# ~/.local/bin

0 commit comments

Comments
 (0)